Example #1
0
 def test_set_elements_from_serialized(self):
     tm = self.tm
     elements = OrderedDict()
     elements["col1"] = StringArrayMeta()
     elements["col2"] = StringArrayMeta()
     elements = TableElementMap(elements)
     serialized = elements.to_dict()
     tm.set_elements(serialized)
     self.assertEqual(serialized, tm.elements.to_dict())
Example #2
0
 def test_set_elements(self):
     tm = self.tm
     elements = OrderedDict()
     elements["col1"] = StringArrayMeta()
     elements["col2"] = StringArrayMeta()
     elements = TableElementMap(elements)
     tm.set_elements(elements)
     self.assertEqual(elements, tm.elements)
     tm.process.report_changes.assert_called_once_with([["elements"], elements.to_dict()])