Revision e2ae110e
Correction de vigicore, vigiboard & vigilo-turbogears pour passer les tests unitaires.
Mise à jour des tests unitaires pour utiliser à nouveau l'authentification via la BDD (avec les mdp par défaut de Turbogears).
Mise à jour de la classe Access pour gérer le cas où l'IP est inconnue (ex: durant les tests unitaires).
git-svn-id: https://vigilo-dev.si.c-s.fr/svn@952 b22e2e97-25c9-44ff-b637-2e5ceca36478
settings_tests.py | ||
---|---|---|
5 | 5 |
'url': 'sqlite:///:memory:', |
6 | 6 |
} |
7 | 7 |
|
8 |
USE_KERBEROS = False |
|
9 |
|
vigiboard/tests/functional/test_authentication.py | ||
---|---|---|
32 | 32 |
form = resp.form |
33 | 33 |
# Submitting the login form: |
34 | 34 |
form['login'] = u'manager' |
35 |
# XXX Use '42' as the password until remote password validation gets in. |
|
36 |
form['password'] = '42' |
|
35 |
form['password'] = u'managepass' |
|
37 | 36 |
post_login = form.submit(status=302) |
38 | 37 |
# Being redirected to the home page: |
39 | 38 |
assert post_login.location.startswith('http://localhost/post_login') |
... | ... | |
45 | 44 |
def test_logout(self): |
46 | 45 |
"""Logouts must work correctly""" |
47 | 46 |
# Logging in voluntarily the quick way: |
48 |
# XXX Use '42' as the password until remote password validation gets in. |
|
49 |
resp = self.app.get('/login_handler?login=manager&password=42', |
|
47 |
resp = self.app.get('/login_handler?login=manager&password=managepass', |
|
50 | 48 |
status=302) |
51 | 49 |
resp = resp.follow(status=302) |
52 | 50 |
assert 'authtkt' in resp.request.cookies, \ |
Also available in: Unified diff