test: updated test for open to work

This commit is contained in:
Jannat Patel
2026-01-20 22:07:42 +05:30
parent afbdb46fe8
commit 043c7902a3
2 changed files with 8 additions and 7 deletions

View File

@@ -277,14 +277,14 @@ class TestUtils(UnitTestCase):
certified_participants_no_match = get_certified_participants(filters=filters) certified_participants_no_match = get_certified_participants(filters=filters)
self.assertEqual(len(certified_participants_no_match), 0) self.assertEqual(len(certified_participants_no_match), 0)
def test_certified_participants_with_open_to_opportunities(self): def test_certified_participants_with_open_to_work(self):
filters = {"open_to_opportunities": 1} filters = {"open_to_work": 1}
certified_participants_open_to_oppo = get_certified_participants(filters=filters) certified_participants_open_to_work = get_certified_participants(filters=filters)
self.assertEqual(len(certified_participants_open_to_oppo), 0) self.assertEqual(len(certified_participants_open_to_work), 0)
frappe.db.set_value("User", self.student1.email, "open_to", "Opportunities") frappe.db.set_value("User", self.student1.email, "open_to", "Work")
certified_participants_open_to_oppo = get_certified_participants(filters=filters) certified_participants_open_to_work = get_certified_participants(filters=filters)
self.assertEqual(len(certified_participants_open_to_oppo), 1) self.assertEqual(len(certified_participants_open_to_work), 1)
frappe.db.set_value("User", self.student1.email, "open_to", "") frappe.db.set_value("User", self.student1.email, "open_to", "")
def test_certified_participants_with_open_to_hiring(self): def test_certified_participants_with_open_to_hiring(self):

View File

@@ -28,6 +28,7 @@ class TestAuth(FrappeAPITestCase):
url, url,
headers=headers, headers=headers,
) )
print(response.json)
self.assertEqual(response.json.get("exc_type"), "PermissionError") self.assertEqual(response.json.get("exc_type"), "PermissionError")
def tearDown(self): def tearDown(self):