Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testNormalizeGerman
def testNormalizeLatin1
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 normalizer
 process

Detailed Description

Definition at line 91 of file testUnicodeSplitter.py.


Member Function Documentation

Definition at line 93 of file testUnicodeSplitter.py.

00093 
00094     def afterSetUp(self):
00095         self.normalizer = CaseNormalizer()
00096         self.process = self.normalizer.process

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 97 of file testUnicodeSplitter.py.

00097 
00098     def testNormalizeGerman(self):
00099         input = [u"\xc4ffin"]
00100         output = [u"\xe4ffin"]
00101         output = [t.encode('utf-8') for t in output]
00102 
00103         self.assertEqual(self.process(input), output)
00104 
00105         input = [t.encode('utf-8') for t in input]
00106         self.assertEqual(self.process(input), output)

Definition at line 107 of file testUnicodeSplitter.py.

00107 
00108     def testNormalizeLatin1(self):
00109         #
00110         # Test passes because plone_lexicon pipeline elements
00111         # are coded defensively.
00112         #
00113         input = ["\xc4ffin"]
00114         output = ["\xe4ffin"]
00115 
00116         # May still fail if none of the locales is available
00117         saved = _setlocale(*LATIN1)
00118         try:
00119             self.assertEqual(self.process(input), output)
00120         finally:
00121             _setlocale(saved)
00122 

Here is the call graph for this function:


Member Data Documentation

Definition at line 94 of file testUnicodeSplitter.py.

Definition at line 95 of file testUnicodeSplitter.py.


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