File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -279,9 +279,11 @@ def test_api_base(self):
279
279
def test_api_delayed_initialization (self ):
280
280
app = Flask (__name__ )
281
281
api = flask_restful .Api ()
282
+ api .add_resource (HelloWorld , '/' , endpoint = "hello" )
282
283
api .init_app (app )
284
+ with app .test_client () as client :
285
+ self .assertEquals (client .get ('/' ).status_code , 200 )
283
286
284
- api .add_resource (HelloWorld , '/' , endpoint = "hello" )
285
287
286
288
287
289
def test_api_prefix (self ):
@@ -660,15 +662,15 @@ def test_endpoints(self):
660
662
with app .test_request_context ('/ids/3' ):
661
663
self .assertTrue (api ._has_fr_route ())
662
664
663
-
665
+
664
666
def test_url_for (self ):
665
667
app = Flask (__name__ )
666
668
api = flask_restful .Api (app )
667
669
api .add_resource (HelloWorld , '/ids/<int:id>' )
668
670
with app .test_request_context ('/foo' ):
669
671
self .assertEqual (api .url_for (HelloWorld , id = 123 ), '/ids/123' )
670
672
671
-
673
+
672
674
def test_fr_405 (self ):
673
675
app = Flask (__name__ )
674
676
api = flask_restful .Api (app )
You can’t perform that action at this time.
0 commit comments