Back to index

plone3  3.1.7
Classes | Functions
PluggableAuthService.tests.test_utils Namespace Reference

Classes

class  UtilityTests

Functions

def _createHashedValue
def test_suite

Function Documentation

Definition at line 91 of file test_utils.py.

00091 
00092 def _createHashedValue(items):
00093     import sha
00094     hasher = sha.new()
00095     items = list(items)
00096     items.sort()
00097     for k, v in items:
00098         if isinstance(k, unicode):
00099             k = k.encode('utf-8')
00100         hasher.update(k)
00101         if isinstance(v, unicode):
00102             v = v.encode('utf-8')
00103         hasher.update(v)
00104     return hasher.hexdigest()

Here is the caller graph for this function:

Definition at line 105 of file test_utils.py.

00105 
00106 def test_suite():
00107     return unittest.TestSuite((
00108         unittest.makeSuite(UtilityTests),
00109     ))