migrate db.current_patch_level to SQLAlchemy
This commit is contained in:
parent
e27b57050a
commit
37e8d53b78
3 changed files with 47 additions and 29 deletions
|
|
@ -20,6 +20,15 @@ def a_movie(**kwds) -> models.Movie:
|
|||
return models.Movie(**args)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_current_patch_level(shared_conn: db.Database):
|
||||
async with shared_conn.transaction(force_rollback=True):
|
||||
patch_level = "some-patch-level"
|
||||
assert patch_level != await db.current_patch_level(shared_conn)
|
||||
await db.set_current_patch_level(shared_conn, patch_level)
|
||||
assert patch_level == await db.current_patch_level(shared_conn)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_get(shared_conn: db.Database):
|
||||
async with shared_conn.transaction(force_rollback=True):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue