diff options
author | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2013-01-09 00:19:24 +0100 |
---|---|---|
committer | Elrond <elrond+git.commit@samba-tng.org> | 2013-01-09 00:22:27 +0100 |
commit | 6de8b42e4ed1f1cd663501d5f61032ba41ed0285 (patch) | |
tree | 6b98f43205f9fb481562bba64b79ed62dbd2390e | |
parent | c130e3ee79affaf9e2e52a98506ffb1a7f5c9db6 (diff) | |
download | mediagoblin-6de8b42e4ed1f1cd663501d5f61032ba41ed0285.tar.lz mediagoblin-6de8b42e4ed1f1cd663501d5f61032ba41ed0285.tar.xz mediagoblin-6de8b42e4ed1f1cd663501d5f61032ba41ed0285.zip |
Fix tests on webtest < 1.3.6.
Debian testing ships webtest 1.3.4. And it would be nice to
use the base packages.
One of the csrf tests fails on webtest < 1.3.6.
But using a fresh app fixes it.
We have no clue, why exactly.
When we require webtest 1.3.6, change this.
-rw-r--r-- | mediagoblin/tests/test_csrf_middleware.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mediagoblin/tests/test_csrf_middleware.py b/mediagoblin/tests/test_csrf_middleware.py index 3aa405e0..22a0eb04 100644 --- a/mediagoblin/tests/test_csrf_middleware.py +++ b/mediagoblin/tests/test_csrf_middleware.py @@ -34,7 +34,11 @@ def test_csrf_cookie_set(): def test_csrf_token_must_match(): - test_app = get_test_app(dump_old_app=False) + # We need a fresh app for this test on webtest < 1.3.6. + # We do not understand why, but it fixes the tests. + # If we require webtest >= 1.3.6, we can switch to a non fresh app here. + test_app = get_test_app(dump_old_app=True) + # construct a request with no cookie or form token assert test_app.post('/auth/login/', extra_environ={'gmg.verify_csrf': True}, |