diff options
-rw-r--r-- | yaksh/test_views.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/yaksh/test_views.py b/yaksh/test_views.py index 51c17f3..3b63b41 100644 --- a/yaksh/test_views.py +++ b/yaksh/test_views.py @@ -6338,12 +6338,13 @@ class TestPost(TestCase): ) def test_view_course_forum_denies_anonymous_user(self): - url = '/exam/login/?next=/exam/forum/' + str(self.course.id) + '/' response = self.client.get(reverse('yaksh:course_forum', kwargs={ 'course_id': self.course.id }), follow=True) self.assertEqual(response.status_code, 200) - redirection_url = url + redirection_url = '/exam/login/?next=/exam/forum/{0}/'.format( + str(self.course.id) + ) self.assertRedirects(response, redirection_url) def test_view_course_forum(self): @@ -6388,8 +6389,9 @@ class TestPost(TestCase): 'uuid': post.uid }), follow=True) self.assertEqual(response.status_code, 200) - redirection_url = '/exam/login/?next=/exam/forum/' \ - + str(self.course.id) + '/post/' + str(post.uid) + '/' + redirection_url = '/exam/login/?next=/exam/forum/{0}/post/{1}/'.format( + str(self.course.id), str(post.uid) + ) self.assertRedirects(response, redirection_url) def test_hide_post(self): |