From 6568edd6bf616a0c17c5226f40b494a6b2967dad Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 21 May 2026 13:32:56 -0500 Subject: Move migrations to top-level gn_auth package. In preparation for migrating to pyproject.toml (from setup.py and friends) we need to have only one top-level package. This will also help in improving testing and checks down the line, since everything will be relative to one single top-level directory. --- .../auth/test_migrations_init_data_in_resource_categories_table.py | 2 +- tests/unit/conftest.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/unit/auth/test_migrations_init_data_in_resource_categories_table.py b/tests/unit/auth/test_migrations_init_data_in_resource_categories_table.py index c34a549..a32cacb 100644 --- a/tests/unit/auth/test_migrations_init_data_in_resource_categories_table.py +++ b/tests/unit/auth/test_migrations_init_data_in_resource_categories_table.py @@ -8,7 +8,7 @@ from gn_auth.migrations import get_migration, apply_migrations, rollback_migrati from tests.unit.auth.conftest import ( apply_single_migration, rollback_single_migration, migrations_up_to) -MIGRATION_PATH = "migrations/auth/20221108_04_CKcSL-init-data-in-resource-categories-table.py" +MIGRATION_PATH = "gn_auth/migrations/auth/20221108_04_CKcSL-init-data-in-resource-categories-table.py" @pytest.mark.unit_test def test_apply_init_data(auth_testdb_path, auth_migrations_dir, backend): diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index 53ee062..c6abc65 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -30,7 +30,8 @@ def fxtr_app(): f'testdb_{datetime.now().strftime("%Y%m%dT%H%M%S")}') testuploadsdir = Path(testdir).joinpath("uploads") testuploadsdir.mkdir() - app = create_app({ + app = create_app() + app.config.update({ "TESTING": True, "AUTH_DB": testdb, "GN_AUTH_SECRETS": str(setup_secrets(testdir)), -- cgit 1.4.1