MCPcopy
hub / github.com/urllib3/urllib3 / test_pop

Method test_pop

test/test_collections.py:360–369  ·  view source on GitHub ↗
(self, d: HTTPHeaderDict)

Source from the content-addressed store, hash-verified

358 assert d != 2
359
360 def test_pop(self, d: HTTPHeaderDict) -> None:
361 key = "Cookie"
362 a = d[key]
363 b = d.pop(key)
364 assert a == b
365 assert key not in d
366 with pytest.raises(KeyError):
367 d.pop(key)
368 dummy = object()
369 assert dummy is d.pop(key, dummy)
370
371 def test_discard(self, d: HTTPHeaderDict) -> None:
372 d.discard("cookie")

Callers

nothing calls this directly

Calls 1

popMethod · 0.80

Tested by

no test coverage detected