From: Stephen Finucane Date: Tue, 21 Jun 2016 17:16:28 +0000 (+0100) Subject: tests: Clean up 'test_user_browser' X-Git-Tag: v2.0.0-rc1~309 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c7925960f0b1500dbab16cf9e1fd91ab0bc2ee5f;p=thirdparty%2Fpatchwork.git tests: Clean up 'test_user_browser' * Don't use hardcode routes: use the reverse function instead Signed-off-by: Stephen Finucane Reviewed-by: Andy Doan --- diff --git a/patchwork/tests/test_user_browser.py b/patchwork/tests/test_user_browser.py index dccb2f49..13503f50 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"]')