(self)
| 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"}) |
nothing calls this directly
no test coverage detected