(self)
| 39 | TestItem({"name": "john doe", "other": "foo"}) |
| 40 | |
| 41 | def test_invalid_field(self): |
| 42 | class TestItem(Item): |
| 43 | pass |
| 44 | |
| 45 | i = TestItem() |
| 46 | with pytest.raises(KeyError): |
| 47 | i["field"] = "text" |
| 48 | with pytest.raises(KeyError): |
| 49 | i["field"] |
| 50 | |
| 51 | def test_repr(self): |
| 52 | class TestItem(Item): |