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/auth/fixtures/user_fixtures.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/unit/auth/fixtures/user_fixtures.py') diff --git a/tests/unit/auth/fixtures/user_fixtures.py b/tests/unit/auth/fixtures/user_fixtures.py index 843d575..89b7e62 100644 --- a/tests/unit/auth/fixtures/user_fixtures.py +++ b/tests/unit/auth/fixtures/user_fixtures.py @@ -18,7 +18,7 @@ TEST_USERS = ( "unaff@iliated.user", "Unaffiliated User")) @pytest.fixture(scope="function") -def test_users(conn_after_auth_migrations):# pylint: disable=[redefined-outer-name] +def fxtr_users(conn_after_auth_migrations):# pylint: disable=[redefined-outer-name] """Fixture: setup test users.""" query = "INSERT INTO users(user_id, email, name) VALUES (?, ?, ?)" query_user_roles = "INSERT INTO user_roles(user_id, role_id) VALUES (?, ?)" @@ -44,9 +44,9 @@ def test_users(conn_after_auth_migrations):# pylint: disable=[redefined-outer-na ("9a0c7ce5-2f40-4e78-979e-bf3527a59579",))) @pytest.fixture(scope="function") -def fixture_users_with_passwords(test_users): # pylint: disable=[redefined-outer-name] +def fxtr_users_with_passwords(fxtr_users): # pylint: disable=[redefined-outer-name] """Fixture: add passwords to the users""" - conn, users = test_users + conn, users = fxtr_users user_passwords_params = tuple( (str(user.user_id), bcrypt.hashpw( f"password_for_user_{idx:03}".encode("utf8"), -- cgit v1.2.3