From cfb423d474064183e3d00b7828ef81c2a498dea6 Mon Sep 17 00:00:00 2001 From: Anurag Kanungo Date: Tue, 24 Feb 2015 18:01:24 +0530 Subject: [PATCH] Moved import to top --- kalite/distributed/tests/browser_tests/quiz.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kalite/distributed/tests/browser_tests/quiz.py b/kalite/distributed/tests/browser_tests/quiz.py index c0e938a31c..c01b471991 100755 --- a/kalite/distributed/tests/browser_tests/quiz.py +++ b/kalite/distributed/tests/browser_tests/quiz.py @@ -1,6 +1,9 @@ """ These use a web-browser, along selenium, to simulate user actions. """ + +import urllib + from django.conf import settings logging = settings.LOG from django.core.urlresolvers import reverse @@ -10,8 +13,6 @@ from kalite.testing.mixins import BrowserActionMixins, FacilityMixins from selenium.webdriver.common.keys import Keys -import urllib - PLAYLIST_ID = "g4_u400_ap1" @@ -68,4 +69,5 @@ def test_unauthorized_request_redirect_to_login(self): self.browser.find_element_by_id('solutionarea').find_element_by_css_selector('input[type=text]').click() self.browser_send_keys(unicode("Anurag")) self.browser_send_keys(Keys.RETURN) + #Not using urlencode for next param as its hassle to use escape character for params only. self.assertEqual(self.browser.current_url, self.reverse('login') + "?next=" + reverse("view_playlist", kwargs={"playlist_id": PLAYLIST_ID}) + "#" + hash_value)