mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 06:52:06 -05: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:
@@ -24,7 +24,7 @@ def notify_api(request):
|
||||
return app
|
||||
|
||||
|
||||
@pytest.yield_fixture(scope='function')
|
||||
@pytest.fixture(scope='function')
|
||||
def client(notify_api):
|
||||
with notify_api.test_request_context(), notify_api.test_client() as client:
|
||||
yield client
|
||||
|
||||
Reference in New Issue
Block a user