From 59346d7546343f70047a736634305176037cdd59 Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Tue, 30 Aug 2016 11:18:30 +0100 Subject: [PATCH] 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) --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 122f4933b..c5c57ae7e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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