changeset 5204:938435e5a011

tests: remove hardcoded test_regular2 username
author Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
date Sat, 20 Jun 2015 21:43:15 +0200
parents 29d0ed59e674
children 01abb838b7a8
files kallithea/tests/functional/test_my_account.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/tests/functional/test_my_account.py	Sat Jun 20 21:40:59 2015 +0200
+++ b/kallithea/tests/functional/test_my_account.py	Sat Jun 20 21:43:15 2015 +0200
@@ -164,7 +164,7 @@
         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 @@
         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 @@
         ('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 @@
                 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 @@
 
 
     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'))