summaryrefslogtreecommitdiff
path: root/yaksh/test_views.py
diff options
context:
space:
mode:
authorKing2019-04-17 21:40:45 +0530
committerKing2019-04-17 21:40:45 +0530
commit7a60f93b461f79d05947188567468d584a64023b (patch)
tree198c5fc6b4fa167083aa4b542a8926858b3a2e86 /yaksh/test_views.py
parent23f0364a7b1724ae69165537df5aa68916ed3e0a (diff)
downloadonline_test-7a60f93b461f79d05947188567468d584a64023b.tar.gz
online_test-7a60f93b461f79d05947188567468d584a64023b.tar.bz2
online_test-7a60f93b461f79d05947188567468d584a64023b.zip
Fix PEP8 issue
Diffstat (limited to 'yaksh/test_views.py')
-rw-r--r--yaksh/test_views.py17
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(