summaryrefslogtreecommitdiff
path: root/yaksh
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh')
-rw-r--r--yaksh/test_views.py11
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()