diff options
author | CruiseDevice | 2020-05-06 22:31:56 +0530 |
---|---|---|
committer | CruiseDevice | 2020-05-06 22:31:56 +0530 |
commit | 23c238315aacb7736a97c35040846b7c7104bb43 (patch) | |
tree | c949e12c6629fceaf20cdcaf01daf5df2eab1b12 /yaksh/test_views.py | |
parent | 66c881ff2769560258b3d72a12aedd0df17b9d27 (diff) | |
download | online_test-23c238315aacb7736a97c35040846b7c7104bb43.tar.gz online_test-23c238315aacb7736a97c35040846b7c7104bb43.tar.bz2 online_test-23c238315aacb7736a97c35040846b7c7104bb43.zip |
Fix tests
Diffstat (limited to 'yaksh/test_views.py')
-rw-r--r-- | yaksh/test_views.py | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/yaksh/test_views.py b/yaksh/test_views.py index 94b81ad..af0193e 100644 --- a/yaksh/test_views.py +++ b/yaksh/test_views.py @@ -2974,11 +2974,14 @@ class TestCourseDetail(TestCase): username=self.user1.username, password=self.user1_plaintext_pass ) - response = self.client.post( - reverse('yaksh:enroll_users', - kwargs={'course_id': self.user1_course.id}), - data={'check': self.student1.id} - ) + url = reverse('yaksh:enroll_reject_user', kwargs={ + 'course_id': self.user1_course.id + }) + data = { + 'check': self.student1.id, + 'enroll': 'enroll' + } + response = self.client.post(url, data) enrolled_student = self.user1_course.students.all() self.assertEqual(response.status_code, 302) self.assertSequenceEqual([self.student1], enrolled_student) @@ -3008,11 +3011,14 @@ class TestCourseDetail(TestCase): username=self.user1.username, password=self.user1_plaintext_pass ) - response = self.client.post( - reverse('yaksh:reject_users', - kwargs={'course_id': self.user1_course.id}), - data={'check': self.student1.id} - ) + url = reverse('yaksh:enroll_reject_user', kwargs={ + 'course_id': self.user1_course.id + }) + data = { + 'check': self.student1.id, + 'reject': 'reject' + } + response = self.client.post(url, data) enrolled_student = self.user1_course.rejected.all() self.assertEqual(response.status_code, 302) self.assertSequenceEqual([self.student1], enrolled_student) |