File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -445,6 +445,25 @@ def backend_index():
445
445
self .assert_equal (c .get ('/fe2' ).data .strip (), b'/fe' )
446
446
self .assert_equal (c .get ('/be' ).data .strip (), b'/fe' )
447
447
448
+ def test_dotted_names_from_app (self ):
449
+ app = flask .Flask (__name__ )
450
+ app .testing = True
451
+ test = flask .Blueprint ('test' , __name__ )
452
+
453
+ @app .route ('/' )
454
+ def app_index ():
455
+ return flask .url_for ('test.index' )
456
+
457
+ @test .route ('/test/' )
458
+ def index ():
459
+ return flask .url_for ('app_index' )
460
+
461
+ app .register_blueprint (test )
462
+
463
+ with app .test_client () as c :
464
+ rv = c .get ('/' )
465
+ self .assert_equal (rv .data , b'/test/' )
466
+
448
467
def test_empty_url_defaults (self ):
449
468
bp = flask .Blueprint ('bp' , __name__ )
450
469
You can’t perform that action at this time.
0 commit comments