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

20 lines
329 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
2023-06-03 21:09:50 +00:00
def test_db_initializes(store: Db):
assert isinstance(store, Db)
2023-06-03 19:22:49 +00:00
2023-06-03 21:09:50 +00:00
def test_db_savepoint(store: Db):
2023-06-03 19:22:49 +00:00
obj = store.savepoint()
assert hasattr(obj, "__enter__")
assert hasattr(obj, "__exit__")
flag = False
with obj:
flag = True
assert flag