summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorankitjavalkar2021-01-06 17:07:35 +0530
committerankitjavalkar2021-01-06 17:07:35 +0530
commitd7b7b2967b68045bda590af57a123b4d17d16e9c (patch)
tree48911f1273fdbe5de2e615a399e2f829fb46de55
parente50673216aaea50d9e14cc10d8e7fc03b2a8ea42 (diff)
downloadonline_test-d7b7b2967b68045bda590af57a123b4d17d16e9c.tar.gz
online_test-d7b7b2967b68045bda590af57a123b4d17d16e9c.tar.bz2
online_test-d7b7b2967b68045bda590af57a123b4d17d16e9c.zip
Fix broken test cases
-rw-r--r--yaksh/test_views.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/yaksh/test_views.py b/yaksh/test_views.py
index c2fa4ac..15fb77c 100644
--- a/yaksh/test_views.py
+++ b/yaksh/test_views.py
@@ -5655,10 +5655,12 @@ class TestShowStatistics(TestCase):
"course_id": self.course.id}),
follow=True
)
+ question_stats = response.context['question_stats']
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, 'yaksh/statistics_question.html')
+ self.assertIn(self.question, list(question_stats.keys()))
self.assertSequenceEqual(
- response.context['question_stats'][self.question], [1, 1]
+ list(question_stats.values())[0]['answered'], [1, 1]
)
self.assertEqual(response.context['attempts'][0], 1)
self.assertEqual(response.context['total'], 1)