mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-11 10:28:55 -04:00
add new client fixture
replaces previous notify_api fixture with the age old:
```
with notify_api.test_request_context():
with notify_api.test_client() as client:
```
just runs those two context managers in a yield fixture (new pytest 3.0 feature)
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ def notify_api(request):
|
|||||||
return app
|
return app
|
||||||
|
|
||||||
|
|
||||||
@pytest.yield_fixture(scope='function')
|
@pytest.fixture(scope='function')
|
||||||
def client(notify_api):
|
def client(notify_api):
|
||||||
with notify_api.test_request_context(), notify_api.test_client() as client:
|
with notify_api.test_request_context(), notify_api.test_client() as client:
|
||||||
yield client
|
yield client
|
||||||
|
|||||||
Reference in New Issue
Block a user