From 88ae10f611beda610d4fd9402100d9838870424b Mon Sep 17 00:00:00 2001 From: Patman64 Date: Sat, 30 May 2015 23:13:53 -0400 Subject: [PATCH] Fix ScopeMismatch error when testing The `testapp` fixture depends on the `app` fixture, but the `app` fixture's scope was redefined as 'function' in commit 35c32e, which is narrower than the scope of `testapp` ('session'). Since `testapp` only depends only on `app`, it is safe to make it's scope match `app`. --- {{cookiecutter.app_name}}/tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.app_name}}/tests/conftest.py b/{{cookiecutter.app_name}}/tests/conftest.py index 6dd48d1..1bfe570 100644 --- a/{{cookiecutter.app_name}}/tests/conftest.py +++ b/{{cookiecutter.app_name}}/tests/conftest.py @@ -21,7 +21,7 @@ def app(): ctx.pop() -@pytest.fixture(scope='session') +@pytest.fixture(scope='function') def testapp(app): """A Webtest app.""" return TestApp(app)