# HG changeset patch # User Thomas De Schampheleire # Date 2015-06-20 21:43:15 # Node ID 938435e5a01120b7ff33dffd1bd859e51119f2cf # Parent 29d0ed59e6742dafe8386edbe6da03e76039507a tests: remove hardcoded test_regular2 username diff --git a/kallithea/tests/functional/test_my_account.py b/kallithea/tests/functional/test_my_account.py --- a/kallithea/tests/functional/test_my_account.py +++ b/kallithea/tests/functional/test_my_account.py @@ -164,7 +164,7 @@ class TestMyAccountController(TestContro response.mustcontain('This e-mail address is already taken') def test_my_account_update_err(self): - self.log_user('test_regular2', 'test12') + self.log_user(TEST_USER_REGULAR2_LOGIN, 'test12') new_email = 'newmail.pl' response = self.app.post(url('my_account'), @@ -185,7 +185,7 @@ class TestMyAccountController(TestContro response.mustcontain(u"%s" % msg) def test_my_account_api_keys(self): - usr = self.log_user('test_regular2', 'test12') + usr = self.log_user(TEST_USER_REGULAR2_LOGIN, 'test12') user = User.get(usr['user_id']) response = self.app.get(url('my_account_api_keys')) response.mustcontain(user.api_key) @@ -197,7 +197,7 @@ class TestMyAccountController(TestContro ('30days', 60*60*24*30), ]) def test_my_account_add_api_keys(self, desc, lifetime): - usr = self.log_user('test_regular2', 'test12') + usr = self.log_user(TEST_USER_REGULAR2_LOGIN, 'test12') user = User.get(usr['user_id']) response = self.app.post(url('my_account_api_keys'), {'description': desc, 'lifetime': lifetime, '_authentication_token': self.authentication_token()}) @@ -213,7 +213,7 @@ class TestMyAccountController(TestContro Session().commit() def test_my_account_remove_api_key(self): - usr = self.log_user('test_regular2', 'test12') + usr = self.log_user(TEST_USER_REGULAR2_LOGIN, 'test12') user = User.get(usr['user_id']) response = self.app.post(url('my_account_api_keys'), {'description': 'desc', 'lifetime': -1, '_authentication_token': self.authentication_token()}) @@ -232,7 +232,7 @@ class TestMyAccountController(TestContro def test_my_account_reset_main_api_key(self): - usr = self.log_user('test_regular2', 'test12') + usr = self.log_user(TEST_USER_REGULAR2_LOGIN, 'test12') user = User.get(usr['user_id']) api_key = user.api_key response = self.app.get(url('my_account_api_keys'))