From 384d47714ed12861712bee7d5f1b54a5588ece8a Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Tue, 16 May 2023 16:40:11 +0200 Subject: [PATCH] Make test "test_cookies" more mean and helpful --- tests/integration/test_wild.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/test_wild.py b/tests/integration/test_wild.py index ddd6fa2..1abe0f1 100644 --- a/tests/integration/test_wild.py +++ b/tests/integration/test_wild.py @@ -64,9 +64,10 @@ def test_cookies(tmpdir, httpbin): with vcr.use_cassette(testfile): s = requests.Session() s.get(httpbin.url + "/cookies/set?k1=v1&k2=v2") + assert s.cookies.keys() == ["k1", "k2"] r2 = s.get(httpbin.url + "/cookies") - assert len(r2.json()["cookies"]) == 2 + assert sorted(r2.json()["cookies"].keys()) == ["k1", "k2"] def test_amazon_doctype(tmpdir):