test: explicitly start transaction

Postgres for some reason is going in autocommit mode if transaction
isn't started with BEGIN... will fix it separately.
This commit is contained in:
Ankush Menat 2022-04-23 13:08:02 +05:30
parent 7274014b3b
commit 1fa60ba3e7

View file

@ -20,6 +20,7 @@ class FrappeTestCase(unittest.TestCase):
def setUpClass(cls) -> None:
# flush changes done so far to avoid flake
frappe.db.commit()
frappe.db.begin()
if cls.SHOW_TRANSACTION_COMMIT_WARNINGS:
frappe.db.add_before_commit(_commit_watcher)