Commit e93b9a10 by Muhammad Shoaib

test_coverage

parent c7beb4e5
...@@ -609,11 +609,16 @@ class TestStudentProctoredExamAttempt(LoggedInTestCase): ...@@ -609,11 +609,16 @@ class TestStudentProctoredExamAttempt(LoggedInTestCase):
reverse('edx_proctoring.proctored_exam.attempt.collection'), reverse('edx_proctoring.proctored_exam.attempt.collection'),
attempt_data attempt_data
) )
url = reverse('edx_proctoring.proctored_exam.attempt', kwargs={'course_id': proctored_exam.course_id})
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
response = self.client.get( response = self.client.get(url)
reverse('edx_proctoring.proctored_exam.attempt', kwargs={'course_id': proctored_exam.course_id}) self.assertEqual(response.status_code, 200)
) response_data = json.loads(response.content)
self.assertEqual(len(response_data['proctored_exam_attempts']), 1)
url = '{url}?page={invalid_page_no}'.format(url=url, invalid_page_no=9999)
# url with the invalid page # still gives us the first page result.
response = self.client.get(url)
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
response_data = json.loads(response.content) response_data = json.loads(response.content)
self.assertEqual(len(response_data['proctored_exam_attempts']), 1) self.assertEqual(len(response_data['proctored_exam_attempts']), 1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment