fix: commit for postgres db_type before each TestAPI test
This commit is contained in:
parent
3b310afc68
commit
e5db89dd4d
1 changed files with 5 additions and 0 deletions
|
|
@ -39,6 +39,11 @@ class TestResourceAPI(unittest.TestCase):
|
|||
for name in self.GENERATED_DOCUMENTS:
|
||||
frappe.delete_doc_if_exists(self.DOCTYPE, name)
|
||||
|
||||
def setUp(self):
|
||||
# commit to ensure consistency in session (postgres CI randomly fails)
|
||||
if frappe.conf.db_type == "postgres":
|
||||
frappe.db.commit()
|
||||
|
||||
@property
|
||||
def sid(self):
|
||||
if not getattr(self, "_sid", None):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue