Project

General

Profile

Revision bc8c7a50

IDbc8c7a507e3537e025da897149b3d60f5e5056b3
Parent 3f7736d0
Child 02ad3793

Added by Francois POIROTTE almost 12 years ago

Robustesse des tests unitaires.

Les URL retournées par les bibliothèques de test contiennent également
le schéma et l'adresse/port du serveur dans les nouvelles versions.

Change-Id: I2896d68a5d50d049a8fd28863165098527cdb8ac
Reviewed-on: https://vigilo-dev.si.c-s.fr/review/885
Tested-by: Build system <>
Reviewed-by: Francois POIROTTE <>

View differences:

vigiboard/tests/functional/test_authentication.py
38 38
        form['password'] = u'iddad'
39 39
        post_login = form.submit(status=302)
40 40
        # Being redirected to the home page:
41
        assert post_login.location.startswith('/post_login')
41
        assert post_login.location.startswith('/post_login') or \
42
            post_login.location.startswith('http://localhost/post_login'), \
43
            "Result: %s" % post_login.location
42 44
        home_page = post_login.follow(status=302)
43 45
        assert 'authtkt' in home_page.request.cookies, \
44 46
               'Session cookie was not defined: %s' % home_page.request.cookies
......
54 56
               'Session cookie was not defined: %s' % resp.request.cookies
55 57
        # Logging out:
56 58
        resp = self.app.get('/logout_handler', status=302)
57
        assert resp.location.startswith('/post_logout')
59
        assert resp.location.startswith('/post_logout') or \
60
            resp.location.startswith('http://localhost/post_logout'), \
61
            "Result: %s" % resp.location
58 62
        # Finally, redirected to the home page:
59 63
        home_page = resp.follow(status=302)
60 64
        assert home_page.request.cookies.get('authtkt') == '' \

Also available in: Unified diff