[PATCH 20/25] tests: Clean up 'test_user_browser'
Stephen Finucane
stephen.finucane at intel.com
Fri Jun 24 07:53:41 AEST 2016
* Don't use hardcode routes: use the reverse function instead
Signed-off-by: Stephen Finucane <stephen.finucane at intel.com>
---
patchwork/tests/test_user_browser.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/patchwork/tests/test_user_browser.py b/patchwork/tests/test_user_browser.py
index dccb2f4..13503f5 100644
--- a/patchwork/tests/test_user_browser.py
+++ b/patchwork/tests/test_user_browser.py
@@ -17,6 +17,8 @@
# along with Patchwork; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+from django.core.urlresolvers import reverse
+
from patchwork.tests.browser import SeleniumTestCase
from patchwork.tests.utils import create_user
@@ -28,11 +30,11 @@ class LoginTestCase(SeleniumTestCase):
self.user = create_user()
def test_default_focus(self):
- self.get('/user/login/')
+ self.get(reverse('auth_login'))
self.wait_until_focused('#id_username')
def test_login(self):
- self.get('/user/login/')
+ self.get(reverse('auth_login'))
self.enter_text('username', self.user.username)
self.enter_text('password', self.user.password)
self.click('input[value="Login"]')
--
1.7.4.1
More information about the Patchwork
mailing list