Skip to content

Commit f5a1546

Browse files
tests: add a real assertion
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 8a316ef commit f5a1546

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

tests/test_b2c_login.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,9 +1801,23 @@ async def test_set_cookie_header_case_insensitive(self):
18011801
# "SET-COOKIE". Since resp.headers is a CIMultiDict (case-
18021802
# insensitive), all three forms return the same results.
18031803
# These are equivalent mutants.
1804-
pass
1805-
1806-
1804+
headers = CIMultiDict(
1805+
[
1806+
("set-cookie", "a=1; Path=/"),
1807+
("SET-COOKIE", "b=2; Path=/"),
1808+
]
1809+
)
1810+
1811+
# getall should return all values independent of the case used
1812+
# for the lookup key.
1813+
values_mixed = headers.getall("Set-Cookie")
1814+
assert "a=1; Path=/" in values_mixed
1815+
assert "b=2; Path=/" in values_mixed
1816+
assert len(values_mixed) == 2
1817+
1818+
# And the results should be identical for any casing of the key.
1819+
assert headers.getall("set-cookie") == values_mixed
1820+
assert headers.getall("SET-COOKIE") == values_mixed
18071821
class TestB2cLoginLogCallMutants:
18081822
"""Tests that kill logging-related mutants inside b2c_login_with_credentials.
18091823

0 commit comments

Comments
 (0)