From 90cf15cfc04209fbffad309bb866fef346a2037e Mon Sep 17 00:00:00 2001 From: Rohan Bansal Date: Wed, 22 Jan 2020 17:46:55 +0530 Subject: [PATCH] test: remove explicit commit --- frappe/tests/test_api.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frappe/tests/test_api.py b/frappe/tests/test_api.py index 9e6f29e9d5..2472f3191d 100644 --- a/frappe/tests/test_api.py +++ b/frappe/tests/test_api.py @@ -70,7 +70,8 @@ class TestAPI(unittest.TestCase): def test_update_child_doc(self): server = FrappeClient(get_url(), "Administrator", "admin", verify=False) - frappe.db.sql("delete from `tabContact` where first_name = 'George Steevens'") + frappe.db.sql("delete from `tabContact` where first_name = 'George' and last_name = 'Steevens'") + frappe.db.sql("delete from `tabContact` where first_name = 'William' and last_name = 'Shakespeare'") frappe.db.sql("delete from `tabCommunication` where reference_doctype = 'Event'") frappe.db.sql("delete from `tabCommunication Link` where link_doctype = 'Contact'") frappe.db.sql("delete from `tabEvent` where subject = 'Sing a song of sixpence'") @@ -102,8 +103,6 @@ class TestAPI(unittest.TestCase): # the change should run the parent document's validations and # create a Communication record with the new contact - frappe.db.commit() - self.assertTrue(frappe.db.exists("Communication Link", {"link_name": "William Shakespeare"})) def test_delete_doc(self):