Ejemplo n.º 1
0
 def test_resource_resp(self, app, mocker):
     resource = restx.Resource()
     resource.get = mocker.Mock()
     with app.test_request_context("/foo"):
         resource.get.return_value = flask.make_response("")
         resource.dispatch_request()
Ejemplo n.º 2
0
 def test_resource_head(self, app):
     resource = restx.Resource()
     with pytest.raises(AssertionError):
         resource.dispatch_request()
Ejemplo n.º 3
0
 def test_resource(self, app, mocker):
     resource = restx.Resource()
     resource.get = mocker.Mock()
     with app.test_request_context("/foo"):
         resource.dispatch_request()