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.
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},