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 15:55:27 +01:00
parent fa3d4413e7
commit 59346d7546
+1 -1
View File
@@ -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