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:
Leo Hemsted
2016-08-30 11:18:30 +01:00
parent fa3d4413e7
commit 59346d7546

View File

@@ -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