示例#1
0
 def test_wrap_export_item_child(self, _):
     path = [PathNode(name="foo"), PathNode(name="bar")]
     item = MultipleChoiceItem(path=path, options=[Option(value="foo")])
     wrapped = ExportItem.wrap(item.to_json())
     self.assertEqual(type(wrapped), type(item))
     self.assertEqual(wrapped.to_json(), item.to_json())
 def test_wrap_export_item_child(self, _):
     path = [PathNode(name="foo"), PathNode(name="bar")]
     item = MultipleChoiceItem(path=path, options=[Option(value="foo")])
     wrapped = ExportItem.wrap(item.to_json())
     self.assertEqual(type(wrapped), type(item))
     self.assertEqual(wrapped.to_json(), item.to_json())
示例#3
0
 def test_wrap_export_item(self, _):
     path = [PathNode(name="foo"), PathNode(name="bar")]
     item = ExportItem(path=path)
     wrapped = ExportItem.wrap(item.to_json())
     self.assertEqual(type(wrapped), type(item))
     self.assertEqual(wrapped.to_json(), item.to_json())
 def test_wrap_export_item(self, _):
     path = [PathNode(name="foo"), PathNode(name="bar")]
     item = ExportItem(path=path)
     wrapped = ExportItem.wrap(item.to_json())
     self.assertEqual(type(wrapped), type(item))
     self.assertEqual(wrapped.to_json(), item.to_json())