MCPcopy
hub / github.com/psf/requests / test_preserve_last_key_case

Method test_preserve_last_key_case

tests/test_requests.py:2429–2441  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2427 assert frozenset(cid) == keyset
2428
2429 def test_preserve_last_key_case(self):
2430 cid = CaseInsensitiveDict(
2431 {
2432 "Accept": "application/json",
2433 "user-Agent": "requests",
2434 }
2435 )
2436 cid.update({"ACCEPT": "application/json"})
2437 cid["USER-AGENT"] = "requests"
2438 keyset = frozenset(["ACCEPT", "USER-AGENT"])
2439 assert frozenset(i[0] for i in cid.items()) == keyset
2440 assert frozenset(cid.keys()) == keyset
2441 assert frozenset(cid) == keyset
2442
2443 def test_copy(self):
2444 cid = CaseInsensitiveDict(

Callers

nothing calls this directly

Calls 4

CaseInsensitiveDictClass · 0.90
updateMethod · 0.80
keysMethod · 0.80
itemsMethod · 0.45

Tested by

no test coverage detected