def test_serial(self): f, c, ds = get_all_models() s = seres.serial.Serial() r = s.serialize([f, c, ds]) self.assertEqual(r, [ {'__uni__': 'seres.test.models.Flat', 'numeric': 1.62, 'logical': True, 'name': '[unknown]'}, {'__uni__': 'seres.test.models.Child', 'title': 'Class Instance Extraordinaire', 'numeric': 1.62, 'logical': True, 'name': '[unknown]'}, {'__uni__': 'seres.test.models.DataStructures', 'array': [False, 2, 'three'], 'dict': {'three': {'field': 'value', 'empty': {}}, 'two': 2, 'one': True}} ])
def test_outbound(self): s = seres.serial.Serial() f, c, ds = get_all_models() test_file_path = os.path.dirname(os.path.realpath(__file__)) s.outbound(RestUri("file:///" + test_file_path + os.sep + "test.csv"), [f, c, ds])