From 1ecb7bce781badb5b1decebe8c9b025a992f84ac Mon Sep 17 00:00:00 2001 From: richard-dds Date: Mon, 11 Jun 2018 13:54:20 -0400 Subject: [PATCH] Load config in app() test fixture --- tests/conftest.py | 9 +++++++++ tests/test_basic.py | 5 ----- tests/test_routes.py | 5 ----- 3 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 tests/conftest.py diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 00000000..19aa9794 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,9 @@ +import pytest + +from atst.app import make_app, make_config + + +@pytest.fixture +def app(): + config = make_config() + return make_app(config) diff --git a/tests/test_basic.py b/tests/test_basic.py index 76dd5c92..dd2b9a21 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -1,10 +1,5 @@ import pytest -import tornado.web -from atst.app import make_app -@pytest.fixture -def app(): - return make_app() @pytest.mark.gen_test def test_hello_world(http_client, base_url): diff --git a/tests/test_routes.py b/tests/test_routes.py index c6f265b0..61f5d7cf 100644 --- a/tests/test_routes.py +++ b/tests/test_routes.py @@ -1,10 +1,5 @@ import pytest -import tornado.web -from atst.app import make_app -@pytest.fixture -def app(): - return make_app() @pytest.mark.gen_test def test_routes(http_client, base_url):