test: docs are not deleted in tearDown (#25123)
* test: docs are not deleted in tearDown
This commit is contained in:
parent
2cef23d4c9
commit
5d77f10baa
@ -81,15 +81,8 @@ class TestInpatientMedicationOrder(unittest.TestCase):
|
|||||||
self.ip_record.reload()
|
self.ip_record.reload()
|
||||||
discharge_patient(self.ip_record)
|
discharge_patient(self.ip_record)
|
||||||
|
|
||||||
for entry in frappe.get_all('Inpatient Medication Entry'):
|
for doctype in ["Inpatient Medication Entry", "Inpatient Medication Order"]:
|
||||||
doc = frappe.get_doc('Inpatient Medication Entry', entry.name)
|
frappe.db.sql("delete from `tab{doctype}`".format(doctype=doctype))
|
||||||
doc.cancel()
|
|
||||||
doc.delete()
|
|
||||||
|
|
||||||
for entry in frappe.get_all('Inpatient Medication Order'):
|
|
||||||
doc = frappe.get_doc('Inpatient Medication Order', entry.name)
|
|
||||||
doc.cancel()
|
|
||||||
doc.delete()
|
|
||||||
|
|
||||||
def create_dosage_form():
|
def create_dosage_form():
|
||||||
if not frappe.db.exists('Dosage Form', 'Tablet'):
|
if not frappe.db.exists('Dosage Form', 'Tablet'):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user