Exemplo n.º 1
0
 def testConvertScalar(self):
     id = uuid.uuid4()
     self.assertEqual(str(id), NonserializableTypeConverter.convert(id))
Exemplo n.º 2
0
 def testConvertDict(self):
     d = {'id': uuid.uuid4(), 'name': 'x'}
     converted_d = NonserializableTypeConverter.convert(d)
     self.assertEqual(str(d['id']), converted_d['id'])
     self.assertEqual(d['name'], converted_d['name'])
Exemplo n.º 3
0
 def testConvertList(self):
     l = [uuid.uuid4(), 'x']
     converted_l = NonserializableTypeConverter.convert(l)
     self.assertEqual(l[1], converted_l[1])
     self.assertEqual(str(l[0]), converted_l[0])
Exemplo n.º 4
0
 def testConvertScalar(self):
     id = uuid.uuid4()
     self.assertEqual(str(id), NonserializableTypeConverter.convert(id))
Exemplo n.º 5
0
 def testConvertDict(self):
     d = {"id": uuid.uuid4(), "name": "x"}
     converted_d = NonserializableTypeConverter.convert(d)
     self.assertEqual(str(d["id"]), converted_d["id"])
     self.assertEqual(d["name"], converted_d["name"])
Exemplo n.º 6
0
 def testConvertList(self):
     l = [uuid.uuid4(), "x"]
     converted_l = NonserializableTypeConverter.convert(l)
     self.assertEqual(l[1], converted_l[1])
     self.assertEqual(str(l[0]), converted_l[0])