[PATCH 4 of 7] tests: remove hardcoded test e-mail addresses
Thomas De Schampheleire
patrickdepinguin at gmail.com
Sat Jun 20 16:37:57 EDT 2015
# HG changeset patch
# User Thomas De Schampheleire <thomas.de.schampheleire at gmail.com>
# Date 1434832304 -7200
# Sat Jun 20 22:31:44 2015 +0200
# Node ID 359e871608759bf729ad8378be00f3a3bf677942
# Parent 087a949ad8b7d7ecd5416d5fca89ec2953f33eaf
tests: remove hardcoded test e-mail addresses
diff --git a/kallithea/tests/__init__.py b/kallithea/tests/__init__.py
--- a/kallithea/tests/__init__.py
+++ b/kallithea/tests/__init__.py
@@ -70,7 +70,7 @@ log = logging.getLogger(__name__)
'SkipTest', 'ldap_lib_installed', 'BaseTestCase', 'init_stack',
'TESTS_TMP_PATH', 'HG_REPO', 'GIT_REPO', 'NEW_HG_REPO', 'NEW_GIT_REPO',
'HG_FORK', 'GIT_FORK', 'TEST_USER_ADMIN_LOGIN', 'TEST_USER_ADMIN_PASS',
- 'TEST_USER_REGULAR_LOGIN', 'TEST_USER_REGULAR_PASS',
+ 'TEST_USER_ADMIN_EMAIL', 'TEST_USER_REGULAR_LOGIN', 'TEST_USER_REGULAR_PASS',
'TEST_USER_REGULAR_EMAIL', 'TEST_USER_REGULAR2_LOGIN',
'TEST_USER_REGULAR2_PASS', 'TEST_USER_REGULAR2_EMAIL', 'TEST_HG_REPO',
'TEST_HG_REPO_CLONE', 'TEST_HG_REPO_PULL', 'TEST_GIT_REPO',
diff --git a/kallithea/tests/functional/test_login.py b/kallithea/tests/functional/test_login.py
--- a/kallithea/tests/functional/test_login.py
+++ b/kallithea/tests/functional/test_login.py
@@ -198,7 +198,7 @@ class TestLoginController(TestController
{'username': 'test_admin_0',
'password': 'test12',
'password_confirmation': 'test12',
- 'email': 'test_admin at mail.com',
+ 'email': TEST_USER_ADMIN_EMAIL,
'firstname': 'test',
'lastname': 'test'})
@@ -210,7 +210,7 @@ class TestLoginController(TestController
{'username': 'test_admin_1',
'password': 'test12',
'password_confirmation': 'test12',
- 'email': 'TesT_Admin at mail.COM',
+ 'email': TEST_USER_ADMIN_EMAIL.title(),
'firstname': 'test',
'lastname': 'test'})
msg = validators.UniqSystemEmail()()._messages['email_taken']
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
@@ -149,7 +149,7 @@ class TestMyAccountController(TestContro
def test_my_account_update_err_email_exists(self):
self.log_user()
- new_email = 'test_regular at mail.com' # already exisitn email
+ new_email = TEST_USER_REGULAR_EMAIL # already existing email
response = self.app.post(url('my_account'),
params=dict(
username=TEST_USER_ADMIN_LOGIN,
More information about the kallithea-general
mailing list