コード例 #1
0
ファイル: testZope.py プロジェクト: RadioFreeAsia/Zope
 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
ファイル: testZope.py プロジェクト: zopefoundation/Zope
 def testMarshalFloat(self):
     self.assertEqual(simple_marshal(3.1415), ":float")
コード例 #4
0
ファイル: testZope.py プロジェクト: zopefoundation/Zope
 def testMarshalInt(self):
     self.assertEqual(simple_marshal(42), ":int")
コード例 #5
0
ファイル: testZope.py プロジェクト: zopefoundation/Zope
 def testMarshalBool(self):
     self.assertEqual(simple_marshal(True), ':boolean')
コード例 #6
0
ファイル: testZope.py プロジェクト: zopefoundation/Zope
 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
ファイル: testZope.py プロジェクト: RadioFreeAsia/Zope
 def testSimpleMarshal(self):
     self.assertEqual(simple_marshal(u'unic\xF3de'), ":utf8:ustring")
コード例 #13
0
ファイル: testZope.py プロジェクト: TerryMarszr0/Zope
 def testMarshalUnicode(self):
     self.assertEqual(simple_marshal(u'unic\xF3de'), ":utf8:ustring")
コード例 #14
0
ファイル: testZope.py プロジェクト: zopefoundation/Zope
 def testMarshalDate(self):
     self.assertEqual(simple_marshal(DateTime()), ":date")
コード例 #15
0
 def testMarshalFloat(self):
     self.assertEqual(simple_marshal(3.1415), ":float")
コード例 #16
0
ファイル: testZope.py プロジェクト: zopefoundation/Zope
 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)