()
| 78 | |
| 79 | @pytest.mark.flaky(reruns=3, reruns_delay=2) |
| 80 | def 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) |