예제 #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)