Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testNoHead
def testHaveHead
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 ob

Detailed Description

Definition at line 16 of file testS5.py.


Member Function Documentation

Definition at line 18 of file testS5.py.

00018 
00019     def afterSetUp(self):
00020         self.folder.invokeFactory('Document', id='foo')
00021         self.ob = self.folder.restrictedTraverse('foo')

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 34 of file testS5.py.

00034 
00035     def testHaveHead(self):
00036         for good in good_ones:
00037             self.ob.setText(good)
00038             view = self.ob.restrictedTraverse("@@presentation_view")
00039             assert view.enabled() == False
00040             del self.app.REQUEST.__annotations__
00041             self.ob.setPresentation(True)
00042             view = self.ob.restrictedTraverse("@@presentation_view")
00043             assert view.enabled() == True
00044             del self.app.REQUEST.__annotations__
00045             self.ob.setPresentation(False)

Definition at line 22 of file testS5.py.

00022 
00023     def testNoHead(self):
00024         for bad in bad_ones:
00025             self.ob.setText(bad)
00026             view = self.ob.restrictedTraverse("@@presentation_view")
00027             assert view.enabled() == False
00028             del self.app.REQUEST.__annotations__
00029             self.ob.setPresentation(True)
00030             view = self.ob.restrictedTraverse("@@presentation_view")
00031             assert view.enabled() == False
00032             del self.app.REQUEST.__annotations__
00033             self.ob.setPresentation(False)


Member Data Documentation

Definition at line 20 of file testS5.py.


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