Commit 5cb25de9 authored by Valentin Samir's avatar Valentin Samir

Put test username, password, attributes in settings

parent a0ab47a4
......@@ -57,11 +57,11 @@ class TestAuthUser(AuthUser):
def test_password(self, password):
"""test `password` agains the user"""
return self.username == "test" and password == "test"
return self.username == settings.CAS_TEST_USER and password == settings.CAS_TEST_PASSWORD
def attributs(self):
"""return a dict of user attributes"""
return {'nom': 'Nymous', 'prenom': 'Ano', 'email': 'anonymous@example.net'}
return settings.CAS_TEST_ATTRIBUTES
class MysqlAuthUser(AuthUser):
......
......@@ -73,3 +73,7 @@ setting_default('CAS_SQL_DBCHARSET', 'utf8')
setting_default('CAS_SQL_USER_QUERY', 'SELECT user AS usersame, pass AS '
'password, users.* FROM users WHERE user = %s')
setting_default('CAS_SQL_PASSWORD_CHECK', 'crypt') # crypt or plain
setting_default('CAS_TEST_USER', 'test')
setting_default('CAS_TEST_PASSWORD', 'test')
setting_default('CAS_TEST_ATTRIBUTES', {'nom': 'Nymous', 'prenom': 'Ano', 'email': 'anonymous@example.net'})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment