update test cookie handling for Werkzeug 2.3

This commit is contained in:
David Lord 2023-04-12 10:33:52 -07:00
parent a30b6e723c
commit 04c21387db
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
4 changed files with 47 additions and 58 deletions

View file

@ -206,10 +206,10 @@ def test_session_transactions_keep_context(app, client, req_ctx):
def test_session_transaction_needs_cookies(app):
c = app.test_client(use_cookies=False)
with pytest.raises(RuntimeError) as e:
with pytest.raises(TypeError, match="Cookies are disabled."):
with c.session_transaction():
pass
assert "cookies" in str(e.value)
def test_test_client_context_binding(app, client):