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

Method test_update

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

Source from the content-addressed store, hash-verified

2369 assert cid.get("notspam", "default") == "default"
2370
2371 def test_update(self):
2372 cid = CaseInsensitiveDict()
2373 cid["spam"] = "blueval"
2374 cid.update({"sPam": "notblueval"})
2375 assert cid["spam"] == "notblueval"
2376 cid = CaseInsensitiveDict({"Foo": "foo", "BAr": "bar"})
2377 cid.update({"fOO": "anotherfoo", "bAR": "anotherbar"})
2378 assert len(cid) == 2
2379 assert cid["foo"] == "anotherfoo"
2380 assert cid["bar"] == "anotherbar"
2381
2382 def test_update_retains_unchanged(self):
2383 cid = CaseInsensitiveDict({"foo": "foo", "bar": "bar"})

Callers

nothing calls this directly

Calls 2

CaseInsensitiveDictClass · 0.90
updateMethod · 0.80

Tested by

no test coverage detected