source/projects/tentacles/test/python/test_store.py

20 lines
317 B
Python
Raw Normal View History

2023-06-03 19:22:49 +00:00
#!/usr/bin/env python3
2023-06-03 21:09:50 +00:00
from tentacles.db import Db
2023-06-03 19:22:49 +00:00
def test_db_initializes(db: Db):
assert isinstance(db, Db)
2023-06-03 19:22:49 +00:00
def test_db_savepoint(db: Db):
obj = db.savepoint()
2023-06-03 19:22:49 +00:00
assert hasattr(obj, "__enter__")
assert hasattr(obj, "__exit__")
flag = False
with obj:
flag = True
assert flag