Back to index

python3.2  3.2.2
Public Member Functions
test.test_xmlrpc.DateTimeTestCase Class Reference

List of all members.

Public Member Functions

def test_default
def test_time
def test_time_tuple
def test_time_struct
def test_datetime_datetime
def test_repr
def test_decode

Detailed Description

Definition at line 195 of file test_xmlrpc.py.


Member Function Documentation

Definition at line 215 of file test_xmlrpc.py.

00215 
00216     def test_datetime_datetime(self):
00217         d = datetime.datetime(2007,1,2,3,4,5)
00218         t = xmlrpclib.DateTime(d)
00219         self.assertEqual(str(t), '20070102T03:04:05')

Here is the call graph for this function:

Definition at line 226 of file test_xmlrpc.py.

00226 
00227     def test_decode(self):
00228         d = ' 20070908T07:11:13  '
00229         t1 = xmlrpclib.DateTime()
00230         t1.decode(d)
00231         tref = xmlrpclib.DateTime(datetime.datetime(2007,9,8,7,11,13))
00232         self.assertEqual(t1, tref)
00233 
00234         t2 = xmlrpclib._datetime(d)
00235         self.assertEqual(t1, tref)

Here is the call graph for this function:

Definition at line 196 of file test_xmlrpc.py.

00196 
00197     def test_default(self):
00198         t = xmlrpclib.DateTime()

Definition at line 220 of file test_xmlrpc.py.

00220 
00221     def test_repr(self):
00222         d = datetime.datetime(2007,1,2,3,4,5)
00223         t = xmlrpclib.DateTime(d)
00224         val ="<DateTime '20070102T03:04:05' at %x>" % id(t)
00225         self.assertEqual(repr(t), val)

Here is the call graph for this function:

Definition at line 199 of file test_xmlrpc.py.

00199 
00200     def test_time(self):
00201         d = 1181399930.036952
00202         t = xmlrpclib.DateTime(d)
00203         self.assertEqual(str(t),
00204                          time.strftime("%Y%m%dT%H:%M:%S", time.localtime(d)))

Here is the call graph for this function:

Definition at line 210 of file test_xmlrpc.py.

00210 
00211     def test_time_struct(self):
00212         d = time.localtime(1181399930.036952)
00213         t = xmlrpclib.DateTime(d)
00214         self.assertEqual(str(t), time.strftime("%Y%m%dT%H:%M:%S", d))

Here is the call graph for this function:

Definition at line 205 of file test_xmlrpc.py.

00205 
00206     def test_time_tuple(self):
00207         d = (2007,6,9,10,38,50,5,160,0)
00208         t = xmlrpclib.DateTime(d)
00209         self.assertEqual(str(t), '20070609T10:38:50')

Here is the call graph for this function:


The documentation for this class was generated from the following file: