15
15
client , config , accept_json , accept_jsonp , accept_any , accept_mimetype ,
16
16
client_class , live_server , request_ctx
17
17
)
18
+ from .pytest_compat import getfixturevalue
18
19
19
20
20
21
class JSONResponse (object ):
@@ -58,7 +59,7 @@ def test_json(client):
58
59
if 'app' not in request .fixturenames :
59
60
return
60
61
61
- app = request . getfuncargvalue ( 'app' )
62
+ app = getfixturevalue ( request , 'app' )
62
63
monkeypatch .setattr (app , 'response_class' ,
63
64
_make_test_response_class (app .response_class ))
64
65
@@ -75,14 +76,14 @@ def test_app(app, client):
75
76
if 'app' not in request .fixturenames :
76
77
return
77
78
78
- app = request . getfuncargvalue ( 'app' )
79
+ app = getfixturevalue ( request , 'app' )
79
80
80
81
# Get application bound to the live server if ``live_server`` fixture
81
82
# is applyed. Live server application has an explicit ``SERVER_NAME``,
82
83
# so ``url_for`` function generates a complete URL for endpoint which
83
84
# includes application port as well.
84
85
if 'live_server' in request .fixturenames :
85
- app = request . getfuncargvalue ( 'live_server' ).app
86
+ app = getfixturevalue ( request , 'live_server' ).app
86
87
87
88
ctx = app .test_request_context ()
88
89
ctx .push ()
@@ -106,7 +107,7 @@ def test_something(app):
106
107
if 'app' not in request .fixturenames :
107
108
return
108
109
109
- app = request . getfuncargvalue ( 'app' )
110
+ app = getfixturevalue ( request , 'app' )
110
111
options = request .keywords .get ('options' )
111
112
if options is not None :
112
113
for key , value in options .kwargs .items ():
0 commit comments