Back to index

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

List of all members.

Public Member Functions

def testNoneUsesDefault
def testEmptyStringUsesDefault
def testDateWithGMT
def testDateOnly
def testInvalidDateWithGMT
def testInvalidDateOnly
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Detailed Description

Definition at line 447 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 468 of file testDateComponentsSupport.py.

00468 
00469     def testDateOnly(self):
00470         d = self.portal.date_components_support('2004/08/31')
00471         hours = d.get('hours')
00472         # default == 0
00473         self.failUnless(hours[1]['selected'])   # 0th hour

Definition at line 461 of file testDateComponentsSupport.py.

00461 
00462     def testDateWithGMT(self):
00463         # Any GMT suffix gets truncated
00464         d = self.portal.date_components_support('2004/08/31 04:30:00 GMT+2')
00465         hours = d.get('hours')
00466         # default == 0
00467         self.failUnless(hours[5]['selected'])   # 4th hour

Definition at line 455 of file testDateComponentsSupport.py.

00455 
00456     def testEmptyStringUsesDefault(self):
00457         d = self.portal.date_components_support('')
00458         hours = d.get('hours')
00459         # default == 1
00460         self.failUnless(hours[0]['selected'])

Definition at line 481 of file testDateComponentsSupport.py.

00481 
00482     def testInvalidDateOnly(self):
00483         d = self.portal.date_components_support('2004/02/31')
00484         hours = d.get('hours')
00485         # default == 1
00486         self.failUnless(hours[0]['selected'])
00487 

Definition at line 474 of file testDateComponentsSupport.py.

00474 
00475     def testInvalidDateWithGMT(self):
00476         # Any GMT suffix gets truncated
00477         d = self.portal.date_components_support('2004/02/31 00:30:00 GMT+2')
00478         hours = d.get('hours')
00479         # default == 1
00480         self.failUnless(hours[0]['selected'])

Definition at line 449 of file testDateComponentsSupport.py.

00449 
00450     def testNoneUsesDefault(self):
00451         d = self.portal.date_components_support(None)
00452         hours = d.get('hours')
00453         # default == 1
00454         self.failUnless(hours[0]['selected'])


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