Skip to content

Commit

Permalink
test: Skip flaky tests.
Browse files Browse the repository at this point in the history
Made #4431 to track
coming back to fix these but also skip them so we stop getting
inconsistent builds until someone can come back to them.
  • Loading branch information
feanil committed Sep 9, 2024
1 parent 6d05d97 commit 025e8a3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions course_discovery/apps/api/tests/test_mixins.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import pytest
from django.test.utils import override_settings
from django.urls import path, reverse
from mock import patch
Expand Down Expand Up @@ -68,6 +69,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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions course_discovery/apps/api/v1/tests/test_views/test_courses.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 """
Expand All @@ -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)
Expand Down

0 comments on commit 025e8a3

Please sign in to comment.