From 043c7902a3d65d7d984d174c55855be87c1855fb Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Tue, 20 Jan 2026 22:07:42 +0530 Subject: [PATCH] test: updated test for open to work --- lms/lms/test_utils.py | 14 +++++++------- lms/test_auth.py | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lms/lms/test_utils.py b/lms/lms/test_utils.py index c33c6fac..7d49bdb7 100644 --- a/lms/lms/test_utils.py +++ b/lms/lms/test_utils.py @@ -277,14 +277,14 @@ class TestUtils(UnitTestCase): certified_participants_no_match = get_certified_participants(filters=filters) self.assertEqual(len(certified_participants_no_match), 0) - def test_certified_participants_with_open_to_opportunities(self): - filters = {"open_to_opportunities": 1} - certified_participants_open_to_oppo = get_certified_participants(filters=filters) - self.assertEqual(len(certified_participants_open_to_oppo), 0) + def test_certified_participants_with_open_to_work(self): + filters = {"open_to_work": 1} + certified_participants_open_to_work = get_certified_participants(filters=filters) + self.assertEqual(len(certified_participants_open_to_work), 0) - frappe.db.set_value("User", self.student1.email, "open_to", "Opportunities") - certified_participants_open_to_oppo = get_certified_participants(filters=filters) - self.assertEqual(len(certified_participants_open_to_oppo), 1) + frappe.db.set_value("User", self.student1.email, "open_to", "Work") + certified_participants_open_to_work = get_certified_participants(filters=filters) + self.assertEqual(len(certified_participants_open_to_work), 1) frappe.db.set_value("User", self.student1.email, "open_to", "") def test_certified_participants_with_open_to_hiring(self): diff --git a/lms/test_auth.py b/lms/test_auth.py index 5981d60f..c5e03788 100644 --- a/lms/test_auth.py +++ b/lms/test_auth.py @@ -28,6 +28,7 @@ class TestAuth(FrappeAPITestCase): url, headers=headers, ) + print(response.json) self.assertEqual(response.json.get("exc_type"), "PermissionError") def tearDown(self):