refactor: govern background job execution
This commit is contained in:
@@ -20,14 +20,17 @@ class DatabaseMigrationTests(unittest.TestCase):
|
||||
).fetchall()
|
||||
self.assertEqual(
|
||||
[(row["version"], row["name"]) for row in rows],
|
||||
[("0001", "adopt_legacy_schema")],
|
||||
[
|
||||
("0001", "adopt_legacy_schema"),
|
||||
("0002", "create_job_runs"),
|
||||
],
|
||||
)
|
||||
ReviewDatabase(path)
|
||||
with database.connect() as connection:
|
||||
count = connection.execute(
|
||||
"SELECT COUNT(*) AS count FROM schema_migrations"
|
||||
).fetchone()["count"]
|
||||
self.assertEqual(count, 1)
|
||||
self.assertEqual(count, 2)
|
||||
|
||||
def test_connection_factory_enables_required_pragmas(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as root:
|
||||
|
||||
Reference in New Issue
Block a user