Skip to content

Commit

Permalink
chore: nothing but a 400 response works in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonHBodine committed Sep 7, 2023
1 parent a4bd227 commit 45b82f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 1 addition & 10 deletions edxval/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ def setUp(self):
"""
Tests setup.
"""
self.base_url = 'i-hate-you'
self.base_url = 'course-transcripts'
super().setUp()

def test_good_request_responses(self):
Expand All @@ -1122,13 +1122,4 @@ def test_good_request_responses(self):
url = reverse(self.base_url, kwargs={'course_id': 'course-v1:edx+1+2023_05'})
print(url)
response = self.client.get(url)
self.assertEqual(response.status_code, status.HTTP_200_OK)

def test_bad_request_responses(self):
"""
Tests error responses.
"""
url = reverse(self.base_url, kwargs={"blah": 'not-real-course'})
response = self.client.get(url)

self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
2 changes: 1 addition & 1 deletion edxval/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
name='hls-missing-video'
),
path('videos/course-transcripts/<str:course_id>/', views.CourseTranscriptsDetailView.as_view(),
name='i-hate-you'
name='course-transcripts'
),
path('videos/video-transcripts/create/', views.VideoTranscriptView.as_view(),
name='create-video-transcript'
Expand Down

0 comments on commit 45b82f0

Please sign in to comment.