Skip to content

Commit 7dbf8cd

Browse files
committed
Fix CSRF test context host overrides
1 parent 072b937 commit 7dbf8cd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

web/regression/python_test_utils/csrf_test_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ def generate_csrf_token(self, *args, **kwargs):
100100
}
101101
self._add_cookies_to_wsgi(environ_overrides)
102102

103-
with self.app.test_request_context():
103+
with self.app.test_request_context(
104+
environ_overrides=environ_overrides
105+
):
104106
# Now, we call Flask-WTF's method of generating a CSRF token...
105107
csrf_token = generate_csrf()
106108
# ...which also sets a value in `flask.session`, so we need to

0 commit comments

Comments
 (0)