MCPcopy Create free account
hub / github.com/0x676e67/wreq-python / test_items_and_iter

Function test_items_and_iter

tests/header_map_test.py:80–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78
79@pytest.mark.flaky(reruns=3, reruns_delay=2)
80def test_items_and_iter():
81 h = HeaderMap()
82 h.insert("A", "1")
83 h.append("A", "2")
84 h.insert("B", "3")
85 items = list(h.items())
86 assert len(items) == 3
87 assert (b"a", b"2") in items
88 assert (b"b", b"3") in items
89 keys = list(iter(h))
90 assert set(keys) == {b"a", b"b"}
91
92
93@pytest.mark.flaky(reruns=3, reruns_delay=2)

Callers

nothing calls this directly

Calls 4

insertMethod · 0.95
appendMethod · 0.95
itemsMethod · 0.95
HeaderMapClass · 0.85

Tested by

no test coverage detected