示例#1
0
 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")
示例#2
0
 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")
示例#3
0
 def testMarshalFloat(self):
     self.assertEqual(simple_marshal(3.1415), ":float")
示例#4
0
 def testMarshalInt(self):
     self.assertEqual(simple_marshal(42), ":int")
示例#5
0
 def testMarshalBool(self):
     self.assertEqual(simple_marshal(True), ':boolean')
示例#6
0
 def testMarshalString(self):
     self.assertEqual(simple_marshal('string'), '')
示例#7
0
 def testMarshalUnicode(self):
     arg_type = ''
     self.assertEqual(simple_marshal(u'unic\xF3de'), arg_type)
示例#8
0
 def testMarshalDate(self):
     self.assertEqual(simple_marshal(DateTime()), ":date")
示例#9
0
 def testMarshalInt(self):
     self.assertEqual(simple_marshal(42), ":int")
示例#10
0
 def testMarshalBool(self):
     self.assertEqual(simple_marshal(True), ':boolean')
示例#11
0
 def testMarshalString(self):
     self.assertEqual(simple_marshal('string'), '')
示例#12
0
 def testSimpleMarshal(self):
     self.assertEqual(simple_marshal(u'unic\xF3de'), ":utf8:ustring")
示例#13
0
 def testMarshalUnicode(self):
     self.assertEqual(simple_marshal(u'unic\xF3de'), ":utf8:ustring")
示例#14
0
 def testMarshalDate(self):
     self.assertEqual(simple_marshal(DateTime()), ":date")
示例#15
0
 def testMarshalFloat(self):
     self.assertEqual(simple_marshal(3.1415), ":float")
示例#16
0
 def testMarshalUnicode(self):
     if PY2:
         arg_type = ':utf8:ustring'
     else:
         arg_type = ''
     self.assertEqual(simple_marshal(u'unic\xF3de'), arg_type)
示例#17
0
 def testMarshalUnicode(self):
     if PY2:
         arg_type = ':utf8:ustring'
     else:
         arg_type = ''
     self.assertEqual(simple_marshal(u'unic\xF3de'), arg_type)