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

19 lines
329 B
Python

#!/usr/bin/env python3
from tentacles.db import Db
def test_db_initializes(store: Db):
assert isinstance(store, Db)
def test_db_savepoint(store: Db):
obj = store.savepoint()
assert hasattr(obj, "__enter__")
assert hasattr(obj, "__exit__")
flag = False
with obj:
flag = True
assert flag