Put test username, password, attributes in settings
This commit is contained in:
parent
a0ab47a4ae
commit
5cb25de99f
@ -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'})
|
||||
|
Loading…
Reference in New Issue
Block a user