MCPcopy
hub / github.com/scrapy/scrapy / test_invalid_field

Method test_invalid_field

tests/test_item.py:41–49  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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):

Callers

nothing calls this directly

Calls 1

TestItemClass · 0.70

Tested by

no test coverage detected