| 774 | h.extend({"x": "x"}, {"x": "x"}) |
| 775 | |
| 776 | def test_update(self): |
| 777 | h = self.storage_class([("a", "0"), ("b", "1"), ("c", "2")]) |
| 778 | h.update(ds.Headers([("a", "3"), ("a", "4")])) |
| 779 | assert h.getlist("a") == ["3", "4"] |
| 780 | h.update(b=["5", "6"]) |
| 781 | assert h.getlist("b") == ["5", "6"] |
| 782 | h.update({"c": "7", "d": ["8", "9"]}) |
| 783 | assert h.getlist("c") == ["7"] |
| 784 | assert h.getlist("d") == ["8", "9"] |
| 785 | h.update({"c": "10"}, c="11") |
| 786 | assert h.getlist("c") == ["11"] |
| 787 | |
| 788 | with pytest.raises(TypeError): |
| 789 | h.extend({"x": "x"}, {"x": "x"}) |
| 790 | |
| 791 | def test_setlist(self): |
| 792 | h = self.storage_class([("a", "0"), ("b", "1"), ("c", "2")]) |