diff --git a/openedx_filters/learning/tests/test_filters.py b/openedx_filters/learning/tests/test_filters.py index a84e31d..ca9a23e 100644 --- a/openedx_filters/learning/tests/test_filters.py +++ b/openedx_filters/learning/tests/test_filters.py @@ -106,7 +106,7 @@ def test_halt_certificate_process(self, CertificateException, attributes): """ exception = CertificateException(message="You can't generate certificate", **attributes) - self.assertDictContainsSubset(attributes, exception.__dict__) + self.assertLessEqual(attributes.items(), exception.__dict__.items()) @ddt @@ -215,7 +215,7 @@ def test_halt_student_auth_process(self, auth_exception, attributes): """ exception = auth_exception(**attributes) - self.assertDictContainsSubset(attributes, exception.__dict__) + self.assertLessEqual(attributes.items(), exception.__dict__.items()) @ddt @@ -275,7 +275,7 @@ def test_halt_enrollment_process(self, enrollment_exception, attributes): """ exception = enrollment_exception(**attributes) - self.assertDictContainsSubset(attributes, exception.__dict__) + self.assertLessEqual(attributes.items(), exception.__dict__.items()) def test_course_enrollments_requested(self): """ @@ -306,7 +306,7 @@ def test_halt_queryset_request(self, request_exception, attributes): """ exception = request_exception(**attributes) - self.assertDictContainsSubset(attributes, exception.__dict__) + self.assertLessEqual(attributes.items(), exception.__dict__.items()) @ddt @@ -377,7 +377,7 @@ def test_halt_dashboard_render(self, dashboard_exception, attributes): """ exception = dashboard_exception(message="You can't access the dashboard", **attributes) - self.assertDictContainsSubset(attributes, exception.__dict__) + self.assertLessEqual(attributes.items(), exception.__dict__.items()) @data( (CourseAboutRenderStarted.RedirectToPage, {"redirect_to": "custom-course-about.html"}), @@ -400,7 +400,7 @@ def test_halt_course_about_render(self, course_about_exception, attributes): """ exception = course_about_exception(message="You can't access the course about", **attributes) - self.assertDictContainsSubset(attributes, exception.__dict__) + self.assertLessEqual(attributes.items(), exception.__dict__.items()) def test_verticalblock_child_render_started(self): """ @@ -440,7 +440,7 @@ def test_halt_vertical_child_block_render(self, block_render_exception, attribut """ exception = block_render_exception(**attributes) - self.assertDictContainsSubset(attributes, exception.__dict__) + self.assertLessEqual(attributes.items(), exception.__dict__.items()) def test_vertical_block_render_completed(self): """ @@ -481,7 +481,7 @@ def test_halt_vertical_block_render(self, render_exception, attributes): """ exception = render_exception(**attributes) - self.assertDictContainsSubset(attributes, exception.__dict__) + self.assertLessEqual(attributes.items(), exception.__dict__.items()) def test_xblock_render_started(self): """ @@ -523,7 +523,7 @@ def test_halt_xblock_render(self, xblock_render_exception, attributes): """ exception = xblock_render_exception(**attributes) - self.assertDictContainsSubset(attributes, exception.__dict__) + self.assertLessEqual(attributes.items(), exception.__dict__.items()) @data( ( @@ -543,7 +543,7 @@ def test_halt_xblock_render_custom_response(self, xblock_render_exception, attri """ exception = xblock_render_exception(**attributes) - self.assertDictContainsSubset(attributes, exception.__dict__) + self.assertLessEqual(attributes.items(), exception.__dict__.items()) def test_account_settings_render_started(self): """ @@ -576,7 +576,7 @@ def test_halt_account_rendering_process(self, AccountSettingsException, attribut """ exception = AccountSettingsException(message="You can't access this page", **attributes) - self.assertDictContainsSubset(attributes, exception.__dict__) + self.assertLessEqual(attributes.items(), exception.__dict__.items()) def test_instructor_dashboard_render_started(self): """ @@ -611,7 +611,7 @@ def test_halt_instructor_dashboard_render(self, dashboard_exception, attributes) """ exception = dashboard_exception(message="You can't access the dashboard", **attributes) - self.assertDictContainsSubset(attributes, exception.__dict__) + self.assertLessEqual(attributes.items(), exception.__dict__.items()) def test_ora_submission_view_render_started(self): """ @@ -641,7 +641,7 @@ def test_halt_ora_submission_view_render(self, dashboard_exception, attributes): """ exception = dashboard_exception(message="You can't access the view", **attributes) - self.assertDictContainsSubset(attributes, exception.__dict__) + self.assertLessEqual(attributes.items(), exception.__dict__.items()) class TestCohortFilters(TestCase):