diff --git a/pytest_flask/plugin.py b/pytest_flask/plugin.py index 18240f6..2e5fd83 100755 --- a/pytest_flask/plugin.py +++ b/pytest_flask/plugin.py @@ -58,7 +58,7 @@ def test_json(client): if 'app' not in request.fixturenames: return - app = request.getfuncargvalue('app') + app = request.getfixturevalue('app') monkeypatch.setattr(app, 'response_class', _make_test_response_class(app.response_class)) @@ -75,14 +75,14 @@ def test_app(app, client): if 'app' not in request.fixturenames: return - app = request.getfuncargvalue('app') + app = request.getfixturevalue('app') # Get application bound to the live server if ``live_server`` fixture # is applyed. Live server application has an explicit ``SERVER_NAME``, # so ``url_for`` function generates a complete URL for endpoint which # includes application port as well. if 'live_server' in request.fixturenames: - app = request.getfuncargvalue('live_server').app + app = request.getfixturevalue('live_server').app ctx = app.test_request_context() ctx.push() @@ -106,7 +106,7 @@ def test_something(app): if 'app' not in request.fixturenames: return - app = request.getfuncargvalue('app') + app = request.getfixturevalue('app') options = request.keywords.get('options') if options is not None: for key, value in options.kwargs.items():