Commit 16ef7877 by Chris Dodge

add unit tests

parent 340bb79c
......@@ -935,6 +935,16 @@ class TestStudentProctoredExamAttempt(LoggedInTestCase):
attempt = get_exam_attempt_by_id(attempt_id)
self.assertEqual(attempt['status'], 'ready_to_start')
# test the polling callback point
response = self.client.get(
reverse(
'edx_proctoring.anonymous.proctoring_poll_status',
args=[attempt_code]
)
)
self.assertEqual(response.status_code, 200)
self.assertEqual(response.data['status'], 'ready_to_start')
def test_bad_exam_code_callback(self):
"""
Assert that we get a 404 when doing a callback on an exam code that does not exist
......@@ -947,6 +957,15 @@ class TestStudentProctoredExamAttempt(LoggedInTestCase):
)
self.assertEqual(response.status_code, 404)
# test the polling callback point as well
response = self.client.get(
reverse(
'edx_proctoring.anonymous.proctoring_poll_status',
args=['foo']
)
)
self.assertEqual(response.status_code, 404)
def test_review_callback(self):
"""
Simulates a callback from the proctoring service with the
......
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