Mercurial > kallithea
changeset 5205:01abb838b7a8
tests: remove hardcoded test_regular username
author | Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> |
---|---|
date | Sat, 20 Jun 2015 22:26:49 +0200 |
parents | 938435e5a011 |
children | 414142964b62 |
files | kallithea/tests/functional/test_changeset_comments.py kallithea/tests/functional/test_login.py |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/tests/functional/test_changeset_comments.py Sat Jun 20 21:43:15 2015 +0200 +++ b/kallithea/tests/functional/test_changeset_comments.py Sat Jun 20 22:26:49 2015 +0200 @@ -104,7 +104,7 @@ self.log_user() rev = '27cd5cce30c96924232dffcd24178a07ffeb5dfc' - text = u'@test_regular check CommentOnRevision' + text = u'@%s check CommentOnRevision' % TEST_USER_REGULAR_LOGIN params = {'text': text, '_authentication_token': self.authentication_token()} response = self.app.post(url(controller='changeset', action='comment', @@ -127,7 +127,7 @@ users = [x.user.username for x in UserNotification.query().all()] # test_regular gets notification by @mention - self.assertEqual(sorted(users), [TEST_USER_ADMIN_LOGIN, u'test_regular']) + self.assertEqual(sorted(users), [TEST_USER_ADMIN_LOGIN, TEST_USER_REGULAR_LOGIN]) def test_delete(self): self.log_user()
--- a/kallithea/tests/functional/test_login.py Sat Jun 20 21:43:15 2015 +0200 +++ b/kallithea/tests/functional/test_login.py Sat Jun 20 22:26:49 2015 +0200 @@ -40,12 +40,12 @@ def test_login_regular_ok(self): response = self.app.post(url(controller='login', action='index'), - {'username': 'test_regular', + {'username': TEST_USER_REGULAR_LOGIN, 'password': 'test12'}) self.assertEqual(response.status, '302 Found') self.assertEqual(response.session['authuser'].get('username'), - 'test_regular') + TEST_USER_REGULAR_LOGIN) response = response.follow() response.mustcontain('/%s' % HG_REPO) @@ -63,7 +63,7 @@ def test_logout(self): response = self.app.post(url(controller='login', action='index'), - {'username': 'test_regular', + {'username': TEST_USER_REGULAR_LOGIN, 'password': 'test12'}) # Verify that a login session has been established.