diff options
Diffstat (limited to 'yaksh/test_views.py')
-rw-r--r-- | yaksh/test_views.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/yaksh/test_views.py b/yaksh/test_views.py index fc736d3..d98435d 100644 --- a/yaksh/test_views.py +++ b/yaksh/test_views.py @@ -2582,7 +2582,6 @@ class TestCourseDetail(TestCase): self.assertIn(uploaded_user.first(), self.user1_course.students.all()) self.assertTemplateUsed(response, 'yaksh/course_detail.html') - def test_upload_existing_user(self): # Given self.client.login( @@ -2593,8 +2592,9 @@ class TestCourseDetail(TestCase): csv_file.close() # When - response = self.client.post(reverse('yaksh:upload_users', - kwargs={'course_id': self.user1_course.id}), + response = self.client.post( + reverse('yaksh:upload_users', + kwargs={'course_id': self.user1_course.id}), data={'csv_file': upload_file}) # Then @@ -2603,7 +2603,6 @@ class TestCourseDetail(TestCase): self.assertTemplateUsed(response, 'yaksh/course_detail.html') self.assertIn(self.user2, self.user1_course.students.all()) - def test_upload_same_user_multiple_course(self): # Given self.client.login( @@ -2617,14 +2616,14 @@ class TestCourseDetail(TestCase): # When response1 = self.client.post( - reverse('yaksh:upload_users', + reverse('yaksh:upload_users', kwargs={'course_id': self.user1_course.id}), - data={'csv_file': upload_file1}) + data={'csv_file': upload_file1}) response2 = self.client.post( - reverse('yaksh:upload_users', + reverse('yaksh:upload_users', kwargs={'course_id': self.user1_othercourse.id}), - data={'csv_file': upload_file2}) + data={'csv_file': upload_file2}) # Then uploaded_users = User.objects.filter(email='abc@xyz.com') @@ -2638,7 +2637,6 @@ class TestCourseDetail(TestCase): self.assertIn(uploaded_users.first(), self.user1_othercourse.students.all()) - def test_upload_users_add_update_reject(self): # Given self.client.login( @@ -2667,7 +2665,6 @@ class TestCourseDetail(TestCase): self.assertIn('upload_details', response.context) self.assertTemplateUsed(response, 'yaksh/course_detail.html') - def test_upload_users_with_wrong_csv(self): # Given self.client.login( |