test: fix test broken by todo schema change

This commit is contained in:
Ankush Menat 2022-01-04 17:23:03 +05:30
parent 11cfa16158
commit e73c51bee6

View File

@ -78,11 +78,11 @@ class TestTask(unittest.TestCase):
return frappe.db.get_value("ToDo",
filters={"reference_type": task.doctype, "reference_name": task.name,
"description": "Close this task"},
fieldname=("owner", "status"), as_dict=True)
fieldname=("allocated_to", "status"), as_dict=True)
assign()
todo = get_owner_and_status()
self.assertEqual(todo.owner, "test@example.com")
self.assertEqual(todo.allocated_to, "test@example.com")
self.assertEqual(todo.status, "Open")
# assignment should be
@ -90,7 +90,7 @@ class TestTask(unittest.TestCase):
task.status = "Completed"
task.save()
todo = get_owner_and_status()
self.assertEqual(todo.owner, "test@example.com")
self.assertEqual(todo.allocated_to, "test@example.com")
self.assertEqual(todo.status, "Closed")
def test_overdue(self):