From da33d719105d67afb1ee6b040380211cfa8be23d Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 3 Jan 2023 05:49:53 +0300 Subject: auth: rename fixtures: test_* -> fxtr_* Since test functions are defined starting with "test_", rename the fixture to more clearly indicate it is a fixture (fxtr_*), an not a test in itself. --- tests/unit/conftest.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/unit/conftest.py') diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index 3020f88..8005c8e 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -8,7 +8,7 @@ import pytest from gn3.app import create_app @pytest.fixture(scope="session") -def test_app(): +def fxtr_app(): """Fixture: setup the test app""" # Do some setup with TemporaryDirectory() as testdir: @@ -24,12 +24,12 @@ def test_app(): testdb.unlink(missing_ok=True) @pytest.fixture(scope="session") -def client(test_app): # pylint: disable=redefined-outer-name +def client(fxtr_app): # pylint: disable=redefined-outer-name """Create a test client fixture for tests""" - with test_app.app_context(): - yield test_app.test_client() + with fxtr_app.app_context(): + yield fxtr_app.test_client() @pytest.fixture(scope="session") -def test_app_config(client): # pylint: disable=redefined-outer-name +def fxtr_app_config(client): # pylint: disable=redefined-outer-name """Return the test application's configuration object""" return client.application.config -- cgit v1.2.3