MCPcopy
hub / github.com/scrapy/scrapy / test_nested_item

Method test_nested_item

tests/test_exporters.py:436–457  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

434 )
435
436 def test_nested_item(self):
437 i1 = {"name": "foo\xa3hoo", "age": "22"}
438 i2 = {"name": "bar", "age": i1}
439 i3 = self.item_class(name="buz", age=i2)
440
441 self.assertExportResult(
442 i3,
443 b"""<?xml version="1.0" encoding="utf-8"?>\n
444 <items>
445 <item>
446 <age>
447 <age>
448 <age>22</age>
449 <name>foo\xc2\xa3hoo</name>
450 </age>
451 <name>bar</name>
452 </age>
453 <name>buz</name>
454 </item>
455 </items>
456 """,
457 )
458
459 def test_nested_list_item(self):
460 i1 = {"name": "foo"}

Callers

nothing calls this directly

Calls 2

assertExportResultMethod · 0.95
item_classMethod · 0.45

Tested by

no test coverage detected