Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
CMFPlone.tests.testDateComponentsSupport.TestDateComponentsSupportAMPMDefault Class Reference
Inheritance diagram for CMFPlone.tests.testDateComponentsSupport.TestDateComponentsSupportAMPMDefault:
Inheritance graph
[legend]
Collaboration diagram for CMFPlone.tests.testDateComponentsSupport.TestDateComponentsSupportAMPMDefault:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def testElements
def testHours
def testAMPM
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 d

Detailed Description

Definition at line 376 of file testDateComponentsSupport.py.


Member Function Documentation

Definition at line 378 of file testDateComponentsSupport.py.

00378 
00379     def afterSetUp(self):
00380         self.d = self.portal.date_components_support(None, use_ampm=1)

Definition at line 30 of file PloneTestCase.py.

00030 
00031     def getAuthenticator(self):
00032         tag = AuthenticatorView('context', 'request').authenticator()
00033         pattern = '<input .*name="(\w+)".*value="(\w+)"'
00034         return match(pattern, tag).groups()

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFPlone.tests.PloneTestCase.PloneTestCase.setRequestMethod (   self,
  method 
) [inherited]
This is a stub now, but in case you want to try
   something fancy on Your Branch (tm), put it here.

Definition at line 26 of file PloneTestCase.py.

00026 
00027     def setRequestMethod(self, method):
00028         self.app.REQUEST.set('REQUEST_METHOD', method)
00029         self.app.REQUEST.method = method

Here is the caller graph for this function:

Definition at line 35 of file PloneTestCase.py.

00035 
00036     def setupAuthenticator(self):
00037         name, token = self.getAuthenticator()
00038         self.app.REQUEST.form[name] = token
00039 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 406 of file testDateComponentsSupport.py.

00406 
00407     def testAMPM(self):
00408         data = [
00409             {'selected': 1,    'id': '--', 'value': 'AM'},
00410             {'selected': None, 'id': 'AM',   'value': 'AM'},
00411             {'selected': None, 'id': 'PM',   'value': 'PM'},
00412         ]
00413 
00414         ampm = self.d.get('ampm')
00415         for i in range(2):
00416             self.assertEqual(ampm[i], data[i])
00417 

Definition at line 381 of file testDateComponentsSupport.py.

00381 
00382     def testElements(self):
00383         self.assertEqual(sortTuple(self.d.keys()),
00384                 ('ampm', 'days', 'hours', 'minutes', 'months', 'years'))

Here is the call graph for this function:

Definition at line 385 of file testDateComponentsSupport.py.

00385 
00386     def testHours(self):
00387         data = [
00388             {'selected': 1,    'id': '--', 'value': '12'},
00389             {'selected': None, 'id': '12',   'value': '12'},
00390             {'selected': None, 'id': '01',   'value': '01'},
00391             {'selected': None, 'id': '02',   'value': '02'},
00392             {'selected': None, 'id': '03',   'value': '03'},
00393             {'selected': None, 'id': '04',   'value': '04'},
00394             {'selected': None, 'id': '05',   'value': '05'},
00395             {'selected': None, 'id': '06',   'value': '06'},
00396             {'selected': None, 'id': '07',   'value': '07'},
00397             {'selected': None, 'id': '08',   'value': '08'},
00398             {'selected': None, 'id': '09',   'value': '09'},
00399             {'selected': None, 'id': '10',   'value': '10'},
00400             {'selected': None, 'id': '11',   'value': '11'},
00401         ]
00402 
00403         hours = self.d.get('hours')
00404         for i in range(13):
00405             self.assertEqual(hours[i], data[i])


Member Data Documentation

Definition at line 379 of file testDateComponentsSupport.py.


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