Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testLocalized_time
def test_ulocalized_time_fetch_error
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 tool

Detailed Description

Definition at line 39 of file testTranslationServiceTool.py.


Member Function Documentation

Definition at line 41 of file testTranslationServiceTool.py.

00041 
00042     def afterSetUp(self):
00043         self.tool = getToolByName(self.portal, 'translation_service')

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 52 of file testTranslationServiceTool.py.

00052 
00053     def test_ulocalized_time_fetch_error(self):
00054         # http://dev.plone.org/plone/ticket/4251
00055         error = "(Missing.Value,), {}"
00056         value = self.tool.ulocalized_time(error)
00057         self.failUnlessEqual(value, None)
00058 

Definition at line 44 of file testTranslationServiceTool.py.

00044 
00045     def testLocalized_time(self):
00046         value = self.tool.ulocalized_time('Mar 9, 1997 1:45pm',
00047                                          long_format=True,
00048                                          context=self.portal)
00049         # TranslationServiceTool falls back to time formats in site properties
00050         # because PTS isn't installed
00051         self.assertEquals(value, 'Mar 09, 1997 01:45 PM')

Here is the call graph for this function:


Member Data Documentation

Definition at line 42 of file testTranslationServiceTool.py.


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