Back to index

plone3  3.1.7
Public Member Functions
Marshall.tests.base.BaseTest Class Reference
Inheritance diagram for Marshall.tests.base.BaseTest:
Inheritance graph
[legend]
Collaboration diagram for Marshall.tests.base.BaseTest:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def loginPortalOwner
def compare
def assertEqualsDiff

Detailed Description

Base Test

Definition at line 48 of file base.py.


Member Function Documentation

def Marshall.tests.base.BaseTest.assertEqualsDiff (   self,
  one,
  two,
  normalize = True 
)

Definition at line 66 of file base.py.

00066 
00067     def assertEqualsDiff(self, one, two, normalize=True):
00068         if normalize:
00069             one, two = normalize_tabs(one), normalize_tabs(two)
00070         one, two = normalize_space(one), normalize_space(two)
00071         self.failUnless(one.splitlines() == two.splitlines(),
00072                         self.compare(one, two))

Here is the call graph for this function:

Here is the caller graph for this function:

def Marshall.tests.base.BaseTest.compare (   self,
  one,
  two 
)

Definition at line 61 of file base.py.

00061 
00062     def compare(self, one, two):
00063         diff = difflib.ndiff(one.splitlines(), two.splitlines())
00064         diff = '\n'.join(list(diff))
00065         return diff

Here is the caller graph for this function:

Use if - AND ONLY IF - you need to manipulate
the portal object itself.

Definition at line 51 of file base.py.

00051 
00052     def loginPortalOwner(self):
00053         '''Use if - AND ONLY IF - you need to manipulate
00054         the portal object itself.
00055         '''
00056         uf = self.app.acl_users
00057         user = uf.getUserById(portal_owner)
00058         if not hasattr(user, 'aq_base'):
00059             user = user.__of__(uf)
00060         newSecurityManager(None, user)

Here is the caller graph for this function:


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