diff options
author | King | 2019-02-26 22:43:10 +0530 |
---|---|---|
committer | GitHub | 2019-02-26 22:43:10 +0530 |
commit | dda5b4626a6df366860b0079447137b709d46d88 (patch) | |
tree | fefe4594ee8837c4eeb52ea853adc69544e0608b /yaksh/test_views.py | |
parent | 8b5674dbd170307f5acac63fa1c53fd94dbe990e (diff) | |
parent | 055dcaa679d50baab56b7e0c20b8de19a400d11c (diff) | |
download | online_test-dda5b4626a6df366860b0079447137b709d46d88.tar.gz online_test-dda5b4626a6df366860b0079447137b709d46d88.tar.bz2 online_test-dda5b4626a6df366860b0079447137b709d46d88.zip |
Merge pull request #566 from ankitjavalkar/toggle-view-grade
Toggle view grade and other UI improvements
Diffstat (limited to 'yaksh/test_views.py')
-rw-r--r-- | yaksh/test_views.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/yaksh/test_views.py b/yaksh/test_views.py index 70c54e3..4c1f5b9 100644 --- a/yaksh/test_views.py +++ b/yaksh/test_views.py @@ -420,10 +420,14 @@ class TestStudentDashboard(TestCase): response = self.client.get(reverse('yaksh:quizlist_user'), follow=True ) + courses_in_context = { + 'data': self.course, + 'completion_percentage': None, + } self.assertEqual(response.status_code, 200) self.assertTemplateUsed(response, "yaksh/quizzes_user.html") self.assertEqual(response.context['title'], 'All Courses') - self.assertEqual(response.context['courses'][0], self.course) + self.assertEqual(response.context['courses'][0], courses_in_context) def test_student_dashboard_enrolled_courses_get(self): """ @@ -439,10 +443,14 @@ class TestStudentDashboard(TestCase): kwargs={'enrolled': "enrolled"}), follow=True ) + courses_in_context = { + 'data': self.course, + 'completion_percentage': 0, + } self.assertEqual(response.status_code, 200) self.assertTemplateUsed(response, "yaksh/quizzes_user.html") self.assertEqual(response.context['title'], 'Enrolled Courses') - self.assertEqual(response.context['courses'][0], self.course) + self.assertEqual(response.context['courses'][0], courses_in_context) def test_student_dashboard_hidden_courses_post(self): """ @@ -456,10 +464,14 @@ class TestStudentDashboard(TestCase): response = self.client.post(reverse('yaksh:quizlist_user'), data={'course_code': 'hide'} ) + courses_in_context = { + 'data': self.hidden_course, + 'completion_percentage': None, + } self.assertEqual(response.status_code, 200) self.assertTemplateUsed(response, "yaksh/quizzes_user.html") self.assertEqual(response.context['title'], 'Search') - self.assertEqual(response.context['courses'][0], self.hidden_course) + self.assertEqual(response.context['courses'][0], courses_in_context) class TestMonitor(TestCase): |