diff options
author | CruiseDevice | 2020-05-09 18:21:54 +0530 |
---|---|---|
committer | CruiseDevice | 2020-05-09 18:21:54 +0530 |
commit | bb21bbe9a38a9d3fc129716525514189ffc4bb7f (patch) | |
tree | 9800eae52412b7a60b72e46d43e8f0b0c8ea4b96 /yaksh | |
parent | 99980a9523c6c8403328e68e78566e315bbf4c5e (diff) | |
download | online_test-bb21bbe9a38a9d3fc129716525514189ffc4bb7f.tar.gz online_test-bb21bbe9a38a9d3fc129716525514189ffc4bb7f.tar.bz2 online_test-bb21bbe9a38a9d3fc129716525514189ffc4bb7f.zip |
Add more tests for course_students view
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/test_views.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/yaksh/test_views.py b/yaksh/test_views.py index b2e62af..be0f7a3 100644 --- a/yaksh/test_views.py +++ b/yaksh/test_views.py @@ -3530,6 +3530,17 @@ class TestCourseStudents(TestCase): response = self.client.get(url) self.assertEqual(response.status_code, 404) + def test_course_students_where_user_is_not_moderator(self): + self.client.login( + username=self.student1, + password=self.student1_plaintext_pass + ) + url = reverse('yaksh:course_students', kwargs={ + 'course_id': self.user1_course.id, + }) + response = self.client.get(url) + self.assertEqual(response.status_code, 404) + def tearDown(self): self.user1.delete() self.user2.delete() |