summaryrefslogtreecommitdiff
path: root/yaksh/test_views.py
diff options
context:
space:
mode:
authorPrabhu Ramachandran2016-07-09 00:01:14 -0500
committerGitHub2016-07-09 00:01:14 -0500
commitf1f9818a397a954acf3bce134ea278fafca81a08 (patch)
treedb3e2e92cd836b072fe3c3e51d2dc4568a9eddc8 /yaksh/test_views.py
parent41b4b7607d8ea6856a8b397d4c9e5bb9edea0b77 (diff)
parent9b66d99965fc8b01b5817159636dcb99e5808ef1 (diff)
downloadonline_test-f1f9818a397a954acf3bce134ea278fafca81a08.tar.gz
online_test-f1f9818a397a954acf3bce134ea278fafca81a08.tar.bz2
online_test-f1f9818a397a954acf3bce134ea278fafca81a08.zip
Merge pull request #112 from prathamesh920/oauth-implementation
oauth implemented
Diffstat (limited to 'yaksh/test_views.py')
-rw-r--r--yaksh/test_views.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/yaksh/test_views.py b/yaksh/test_views.py
index d673ac3..6e59e26 100644
--- a/yaksh/test_views.py
+++ b/yaksh/test_views.py
@@ -67,7 +67,7 @@ class TestProfile(TestCase):
If not logged in redirect to login page
"""
response = self.client.get(reverse('yaksh:view_profile'), follow=True)
- redirect_destination = '/exam/login/?next=%2Fexam%2Fviewprofile%2F'
+ redirect_destination = '/exam/login/?next=/exam/viewprofile/'
self.assertRedirects(response, redirect_destination)
def test_view_profile_get_for_user_without_profile(self):
@@ -213,7 +213,7 @@ class TestAddQuiz(TestCase):
If not logged in redirect to login page
"""
response = self.client.get(reverse('yaksh:add_quiz'), follow=True)
- redirect_destination = '/exam/login/?next=%2Fexam%2Fmanage%2Faddquiz%2F'
+ redirect_destination = '/exam/login/?next=/exam/manage/addquiz/'
self.assertRedirects(response, redirect_destination)
def test_view_profile_denies_non_moderator(self):
@@ -412,8 +412,8 @@ class TestAddTeacher(TestCase):
),
follow=True
)
- redirect_destination = ('/exam/login/?next=%2Fexam'
- '%2Fmanage%2Faddteacher%2F{0}%2F'.format(self.course.id))
+ redirect_destination = ('/exam/login/?next=/exam'
+ '/manage/addteacher/{0}/'.format(self.course.id))
self.assertRedirects(response, redirect_destination)
def test_add_teacher_denies_non_moderator(self):
@@ -569,8 +569,8 @@ class TestRemoveTeacher(TestCase):
),
follow=True
)
- redirect_destination = ('/exam/login/?next=%2Fexam'
- '%2Fmanage%2Fremove_teachers%2F{0}%2F'.format(self.course.id))
+ redirect_destination = ('/exam/login/?next=/exam'
+ '/manage/remove_teachers/{0}/'.format(self.course.id))
self.assertRedirects(response, redirect_destination)
def test_remove_teacher_denies_non_moderator(self):
@@ -714,8 +714,8 @@ class TestCourses(TestCase):
response = self.client.get(reverse('yaksh:courses'),
follow=True
)
- redirect_destination = ('/exam/login/?next=%2Fexam'
- '%2Fmanage%2Fcourses%2F')
+ redirect_destination = ('/exam/login/?next=/exam'
+ '/manage/courses/')
self.assertRedirects(response, redirect_destination)
def test_courses_denies_non_moderator(self):
@@ -824,8 +824,8 @@ class TestCourseDetail(TestCase):
response = self.client.get(reverse('yaksh:add_course'),
follow=True
)
- redirect_destination = ('/exam/login/?next=%2Fexam'
- '%2Fmanage%2Fadd_course%2F')
+ redirect_destination = ('/exam/login/?next=/exam'
+ '/manage/add_course/')
self.assertRedirects(response, redirect_destination)
def test_course_detail_denies_non_moderator(self):
@@ -950,8 +950,8 @@ class TestEnrollRequest(TestCase):
),
follow=True
)
- redirect_destination = ('/exam/login/?next=%2Fexam'
- '%2Fenroll_request%2F{}%2F'.format(self.course.id))
+ redirect_destination = ('/exam/login/?next=/exam'
+ '/enroll_request/{}/'.format(self.course.id))
self.assertRedirects(response, redirect_destination)
def test_enroll_request_get_for_student(self):
@@ -1054,8 +1054,8 @@ class TestSelfEnroll(TestCase):
),
follow=True
)
- redirect_destination = ('/exam/login/?next=%2Fexam'
- '%2Fself_enroll%2F{}%2F'.format(self.course.id))
+ redirect_destination = ('/exam/login/?next=/exam'
+ '/self_enroll/{}/'.format(self.course.id))
self.assertRedirects(response, redirect_destination)
def test_enroll_request_get_for_student(self):