diff options
author | CruiseDevice | 2020-04-16 18:28:52 +0530 |
---|---|---|
committer | CruiseDevice | 2020-04-16 18:28:52 +0530 |
commit | 1ea20bdcd11d38d49030b4009fc91c9df56eedf7 (patch) | |
tree | 4a0ef8fff1a6525363bdad2934bc2c3c9f602a88 /yaksh/test_views.py | |
parent | 971dfd62fcf77ded967bf70f0e16e888ce3a76dd (diff) | |
download | online_test-1ea20bdcd11d38d49030b4009fc91c9df56eedf7.tar.gz online_test-1ea20bdcd11d38d49030b4009fc91c9df56eedf7.tar.bz2 online_test-1ea20bdcd11d38d49030b4009fc91c9df56eedf7.zip |
Resolve comments
Diffstat (limited to 'yaksh/test_views.py')
-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): |