Project

General

Profile

Revision d1d79e6f

IDd1d79e6f932f8a28d8ecef345452763bbaf0c2fe
Parent 8f5db36a
Child 87b152c1

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:

vigigraph/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'), \
42 43
            "Result: %s" % post_login.location
43 44
        home_page = post_login.follow(status=302)
44 45
        assert 'authtkt' in home_page.request.cookies, \
......
56 57
               'Session cookie was not defined: %s' % resp.request.cookies
57 58
        # Logging out:
58 59
        resp = self.app.get('/logout_handler', status=302)
59
        assert resp.location.startswith('/post_logout'), \
60
        assert resp.location.startswith('/post_logout') or \
61
            resp.location.startswith('http://localhost/post_logout'), \
60 62
            "Result: %s" % resp.location
61 63
        # Finally, redirected to the home page:
62 64
        home_page = resp.follow(status=302)
......
65 67
               'Session cookie was not deleted: %s' % home_page.request.cookies
66 68
        assert home_page.location == 'http://localhost/', \
67 69
            "Result: %s" % home_page.location
68

  

Also available in: Unified diff