def testSimpleMarshal(self): '''Simple Marshal Complete Test''' self.assertEqual(simple_marshal('string'), '') self.assertEqual(simple_marshal(True), ':boolean') self.assertEqual(simple_marshal(42), ":int") self.assertEqual(simple_marshal(3.1415), ":float") self.assertEqual(simple_marshal(DateTime()), ":date")
def testMarshalFloat(self): self.assertEqual(simple_marshal(3.1415), ":float")
def testMarshalInt(self): self.assertEqual(simple_marshal(42), ":int")
def testMarshalBool(self): self.assertEqual(simple_marshal(True), ':boolean')
def testMarshalString(self): self.assertEqual(simple_marshal('string'), '')
def testMarshalUnicode(self): arg_type = '' self.assertEqual(simple_marshal(u'unic\xF3de'), arg_type)
def testMarshalDate(self): self.assertEqual(simple_marshal(DateTime()), ":date")
def testSimpleMarshal(self): self.assertEqual(simple_marshal(u'unic\xF3de'), ":utf8:ustring")
def testMarshalUnicode(self): self.assertEqual(simple_marshal(u'unic\xF3de'), ":utf8:ustring")
def testMarshalUnicode(self): if PY2: arg_type = ':utf8:ustring' else: arg_type = '' self.assertEqual(simple_marshal(u'unic\xF3de'), arg_type)