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