Back to index

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

List of all members.

Public Member Functions

def testMinutesStep1
def testMinutesStep10
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Detailed Description

Definition at line 418 of file testDateComponentsSupport.py.


Member Function Documentation

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 420 of file testDateComponentsSupport.py.

00420 
00421     def testMinutesStep1(self):
00422         data = [
00423             {'selected': 1,    'id': '--', 'value': '00'},
00424         ]
00425         for x in range(0, 60, 1):
00426             d={'id': '%02d' % x, 'value': '%02d' % x, 'selected': None}
00427             data.append(d)
00428 
00429         d = self.portal.date_components_support(None, minute_step=1)
00430         minutes = d.get('minutes')
00431         for i in range(61):
00432             self.assertEqual(minutes[i], data[i])

Definition at line 433 of file testDateComponentsSupport.py.

00433 
00434     def testMinutesStep10(self):
00435         data = [
00436             {'selected': 1,    'id': '--', 'value': '00'},
00437         ]
00438         for x in range(0, 60, 10):
00439             d={'id': '%02d' % x, 'value': '%02d' % x, 'selected': None}
00440             data.append(d)
00441 
00442         d = self.portal.date_components_support(None, minute_step=10)
00443         minutes = d.get('minutes')
00444         for i in range(7):
00445             self.assertEqual(minutes[i], data[i])
00446 


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