diff --git a/course_discovery/apps/api/tests/test_mixins.py b/course_discovery/apps/api/tests/test_mixins.py index ec65daf897..50f71021ba 100644 --- a/course_discovery/apps/api/tests/test_mixins.py +++ b/course_discovery/apps/api/tests/test_mixins.py @@ -1,3 +1,5 @@ +import pytest + from django.test.utils import override_settings from django.urls import path, reverse from mock import patch @@ -68,6 +70,7 @@ def test_throttle_authenticated_user(self): assert response.data == "Hello, World" self.client.logout() + @pytest.mark.skip(reason="https://github.com/openedx/course-discovery/issues/4431") def test_throttle_limit__authentication_classes(self): """ Verify that endpoint is throttled against unauthenticated users when requests are greater than limit. diff --git a/course_discovery/apps/api/v1/tests/test_views/test_course_runs.py b/course_discovery/apps/api/v1/tests/test_views/test_course_runs.py index 986cc19855..f9a07de3a3 100644 --- a/course_discovery/apps/api/v1/tests/test_views/test_course_runs.py +++ b/course_discovery/apps/api/v1/tests/test_views/test_course_runs.py @@ -1239,7 +1239,11 @@ def test_list_include_restricted(self, include_restriction_param): else: assert restricted_run.key not in retrieved_keys - @ddt.data([True, 4], [False, 3]) + @ddt.data( + [True, 4], + # Skipping this because it's flaky: https://github.com/openedx/course-discovery/issues/4431 + # [False, 3] + ) @ddt.unpack def test_list_query_include_restricted(self, include_restriction_param, expected_result_count): CourseRunFactory.create_batch(3, title='Some cool title', course__partner=self.partner) diff --git a/course_discovery/apps/api/v1/tests/test_views/test_courses.py b/course_discovery/apps/api/v1/tests/test_views/test_courses.py index 4349d7fea9..885a3d841d 100644 --- a/course_discovery/apps/api/v1/tests/test_views/test_courses.py +++ b/course_discovery/apps/api/v1/tests/test_views/test_courses.py @@ -352,6 +352,7 @@ def test_list(self): self.serialize_course(Course.objects.all(), many=True) ) + @pytest.mark.skip(reason="https://github.com/openedx/course-discovery/issues/4431") @responses.activate def test_list_query(self): """ Verify the endpoint returns a filtered list of courses """ @@ -366,6 +367,7 @@ def test_list_query(self): response = self.client.get(url) self.assertListEqual(response.data['results'], self.serialize_course(courses, many=True)) + @pytest.mark.skip(reason="https://github.com/openedx/course-discovery/issues/4431") def test_list_key_filter(self): """ Verify the endpoint returns a list of courses filtered by the specified keys. """ courses = CourseFactory.create_batch(3, partner=self.partner)