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