mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
chore: replace assertEquals with alias assertEqual (#25613)
* chore: replace assertEquals with alias assertEqual assertEquals has been deprecated. ref: https://docs.python.org/3/library/unittest.html#deprecated-aliases * chore: sider fixes
This commit is contained in:
@@ -17,7 +17,7 @@ class TestClinicalProcedure(unittest.TestCase):
|
||||
|
||||
procedure_template.disabled = 1
|
||||
procedure_template.save()
|
||||
self.assertEquals(frappe.db.get_value('Item', procedure_template.item, 'disabled'), 1)
|
||||
self.assertEqual(frappe.db.get_value('Item', procedure_template.item, 'disabled'), 1)
|
||||
|
||||
def test_consumables(self):
|
||||
patient, medical_department, practitioner = create_healthcare_docs()
|
||||
|
||||
@@ -18,7 +18,7 @@ class TestLabTest(unittest.TestCase):
|
||||
|
||||
lab_template.disabled = 1
|
||||
lab_template.save()
|
||||
self.assertEquals(frappe.db.get_value('Item', lab_template.item, 'disabled'), 1)
|
||||
self.assertEqual(frappe.db.get_value('Item', lab_template.item, 'disabled'), 1)
|
||||
|
||||
lab_template.reload()
|
||||
|
||||
@@ -57,7 +57,7 @@ class TestLabTest(unittest.TestCase):
|
||||
|
||||
# sample collection should not be created
|
||||
lab_test.reload()
|
||||
self.assertEquals(lab_test.sample, None)
|
||||
self.assertEqual(lab_test.sample, None)
|
||||
|
||||
def test_create_lab_tests_from_sales_invoice(self):
|
||||
sales_invoice = create_sales_invoice()
|
||||
|
||||
@@ -20,13 +20,13 @@ class TestPatientAppointment(unittest.TestCase):
|
||||
patient, medical_department, practitioner = create_healthcare_docs()
|
||||
frappe.db.set_value('Healthcare Settings', None, 'automate_appointment_invoicing', 0)
|
||||
appointment = create_appointment(patient, practitioner, nowdate())
|
||||
self.assertEquals(appointment.status, 'Open')
|
||||
self.assertEqual(appointment.status, 'Open')
|
||||
appointment = create_appointment(patient, practitioner, add_days(nowdate(), 2))
|
||||
self.assertEquals(appointment.status, 'Scheduled')
|
||||
self.assertEqual(appointment.status, 'Scheduled')
|
||||
encounter = create_encounter(appointment)
|
||||
self.assertEquals(frappe.db.get_value('Patient Appointment', appointment.name, 'status'), 'Closed')
|
||||
self.assertEqual(frappe.db.get_value('Patient Appointment', appointment.name, 'status'), 'Closed')
|
||||
encounter.cancel()
|
||||
self.assertEquals(frappe.db.get_value('Patient Appointment', appointment.name, 'status'), 'Open')
|
||||
self.assertEqual(frappe.db.get_value('Patient Appointment', appointment.name, 'status'), 'Open')
|
||||
|
||||
def test_start_encounter(self):
|
||||
patient, medical_department, practitioner = create_healthcare_docs()
|
||||
|
||||
@@ -18,24 +18,24 @@ class TestTherapyPlan(unittest.TestCase):
|
||||
|
||||
def test_status(self):
|
||||
plan = create_therapy_plan()
|
||||
self.assertEquals(plan.status, 'Not Started')
|
||||
self.assertEqual(plan.status, 'Not Started')
|
||||
|
||||
session = make_therapy_session(plan.name, plan.patient, 'Basic Rehab', '_Test Company')
|
||||
frappe.get_doc(session).submit()
|
||||
self.assertEquals(frappe.db.get_value('Therapy Plan', plan.name, 'status'), 'In Progress')
|
||||
self.assertEqual(frappe.db.get_value('Therapy Plan', plan.name, 'status'), 'In Progress')
|
||||
|
||||
session = make_therapy_session(plan.name, plan.patient, 'Basic Rehab', '_Test Company')
|
||||
frappe.get_doc(session).submit()
|
||||
self.assertEquals(frappe.db.get_value('Therapy Plan', plan.name, 'status'), 'Completed')
|
||||
self.assertEqual(frappe.db.get_value('Therapy Plan', plan.name, 'status'), 'Completed')
|
||||
|
||||
patient, medical_department, practitioner = create_healthcare_docs()
|
||||
appointment = create_appointment(patient, practitioner, nowdate())
|
||||
session = make_therapy_session(plan.name, plan.patient, 'Basic Rehab', '_Test Company', appointment.name)
|
||||
session = frappe.get_doc(session)
|
||||
session.submit()
|
||||
self.assertEquals(frappe.db.get_value('Patient Appointment', appointment.name, 'status'), 'Closed')
|
||||
self.assertEqual(frappe.db.get_value('Patient Appointment', appointment.name, 'status'), 'Closed')
|
||||
session.cancel()
|
||||
self.assertEquals(frappe.db.get_value('Patient Appointment', appointment.name, 'status'), 'Open')
|
||||
self.assertEqual(frappe.db.get_value('Patient Appointment', appointment.name, 'status'), 'Open')
|
||||
|
||||
def test_therapy_plan_from_template(self):
|
||||
patient = create_patient()
|
||||
@@ -49,7 +49,7 @@ class TestTherapyPlan(unittest.TestCase):
|
||||
si.save()
|
||||
|
||||
therapy_plan_template_amt = frappe.db.get_value('Therapy Plan Template', template, 'total_amount')
|
||||
self.assertEquals(si.items[0].amount, therapy_plan_template_amt)
|
||||
self.assertEqual(si.items[0].amount, therapy_plan_template_amt)
|
||||
|
||||
|
||||
def create_therapy_plan(template=None):
|
||||
|
||||
@@ -13,7 +13,7 @@ class TestTherapyType(unittest.TestCase):
|
||||
|
||||
therapy_type.disabled = 1
|
||||
therapy_type.save()
|
||||
self.assertEquals(frappe.db.get_value('Item', therapy_type.item, 'disabled'), 1)
|
||||
self.assertEqual(frappe.db.get_value('Item', therapy_type.item, 'disabled'), 1)
|
||||
|
||||
def create_therapy_type():
|
||||
exercise = create_exercise_type()
|
||||
|
||||
Reference in New Issue
Block a user