diff options
author | Frederick Muriuki Muriithi | 2022-11-09 11:52:49 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-11-09 11:57:49 +0300 |
commit | b8d33374ba4686fcadeed9f6c60f937f2eb19a89 (patch) | |
tree | c4300bd0908bc378ad15614caadcc5e6555bcb00 /tests/unit/auth/test_create_table_migrations.py | |
parent | e66ca1919381261a0fcdb744d1fc12e8f51739d8 (diff) | |
download | genenetwork3-b8d33374ba4686fcadeed9f6c60f937f2eb19a89.tar.gz |
Tests: Provide backend fixture to (apply|rollback)_single_migration
Diffstat (limited to 'tests/unit/auth/test_create_table_migrations.py')
-rw-r--r-- | tests/unit/auth/test_create_table_migrations.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/auth/test_create_table_migrations.py b/tests/unit/auth/test_create_table_migrations.py index 2263032..97719eb 100644 --- a/tests/unit/auth/test_create_table_migrations.py +++ b/tests/unit/auth/test_create_table_migrations.py @@ -33,7 +33,7 @@ def test_create_table( cursor.execute("SELECT name FROM sqlite_schema WHERE type='table'") result = cursor.fetchall() assert the_table not in [row[0] for row in cursor.fetchall()] - apply_single_migration(auth_testdb_path, get_migration(migration_path)) + apply_single_migration(backend, get_migration(migration_path)) cursor.execute("SELECT name FROM sqlite_schema WHERE type='table'") assert the_table in [row[0] for row in cursor.fetchall()] @@ -53,10 +53,10 @@ def test_rollback_create_table( older_migrations = migrations_up_to(migration_path, auth_migrations_dir) apply_migrations(backend, older_migrations) with closing(sqlite3.connect(auth_testdb_path)) as conn, closing(conn.cursor()) as cursor: - apply_single_migration(auth_testdb_path, get_migration(migration_path)) + apply_single_migration(backend, get_migration(migration_path)) cursor.execute("SELECT name FROM sqlite_schema WHERE type='table'") assert the_table in [row[0] for row in cursor.fetchall()] - rollback_single_migration(auth_testdb_path, get_migration(migration_path)) + rollback_single_migration(backend, get_migration(migration_path)) cursor.execute("SELECT name FROM sqlite_schema WHERE type='table'") assert the_table not in [row[0] for row in cursor.fetchall()] |