2026-04-21 23:22:43 +03:00
|
|
|
from nanobot.session.manager import SessionManager
|
|
|
|
|
|
2026-04-22 06:47:25 +03:00
|
|
|
|
2026-10-16 17:28:47 +08:00
|
|
|
def test_every_transaction_uses_full_synchronous_and_foreign_keys(tmp_path):
|
|
|
|
|
manager = SessionManager(tmp_path)
|
|
|
|
|
for _ in range(2):
|
|
|
|
|
with manager._store.transaction() as db:
|
|
|
|
|
assert db.execute("PRAGMA synchronous").fetchone()[0] == 2
|
|
|
|
|
assert db.execute("PRAGMA foreign_keys").fetchone()[0] == 1
|
|
|
|
|
assert db.execute("PRAGMA journal_mode").fetchone()[0] == "wal"
|