Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testSetObjectRaisesBadRequest
def testCheckIdRaisesBadRequest
def testCheckIdAvailableCatchesBadRequest
def testLPFSetObjectRaisesBadRequest
def testLPFCheckIdRaisesBadRequest
def testLPFCheckIdAvailableCatchesBadRequest
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 lpf

Detailed Description

Definition at line 58 of file testPloneFolder.py.


Member Function Documentation

Definition at line 63 of file testPloneFolder.py.

00063 
00064     def afterSetUp(self):
00065         _createObjectByType('Large Plone Folder', self.folder, 'lpf')
00066         self.lpf = self.folder.lpf

Here is the call graph for this function:

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 85 of file testPloneFolder.py.

00085 
00086     def testCheckIdAvailableCatchesBadRequest(self):
00087         # checkIdAvailable() should catch zExceptions.BadRequest
00088         self.folder._setObject('foo', dummy.Item())
00089         self.failIf(self.folder.checkIdAvailable('foo'))

Definition at line 76 of file testPloneFolder.py.

00076 
00077     def testCheckIdRaisesBadRequest(self):
00078         # _checkId() should raise zExceptions.BadRequest
00079         # on duplicate id.
00080         self.folder._setObject('foo', dummy.Item())
00081         try:
00082             self.folder._checkId('foo')
00083         except BadRequest:
00084             pass

Definition at line 108 of file testPloneFolder.py.

00108 
00109     def testLPFCheckIdAvailableCatchesBadRequest(self):
00110         # checkIdAvailable() should catch zExceptions.BadRequest
00111         self.lpf._setObject('foo', dummy.Item())
00112         self.failIf(self.lpf.checkIdAvailable('foo'))
00113 

Definition at line 99 of file testPloneFolder.py.

00099 
00100     def testLPFCheckIdRaisesBadRequest(self):
00101         # _checkId() should raise zExceptions.BadRequest
00102         # on duplicate id.
00103         self.lpf._setObject('foo', dummy.Item())
00104         try:
00105             self.lpf._checkId('foo')
00106         except BadRequest:
00107             pass

Definition at line 90 of file testPloneFolder.py.

00090 
00091     def testLPFSetObjectRaisesBadRequest(self):
00092         # _setObject() should raise zExceptions.BadRequest
00093         # on duplicate id.
00094         self.lpf._setObject('foo', dummy.Item())
00095         try:
00096             self.lpf._setObject('foo', dummy.Item())
00097         except BadRequest:
00098             pass

Definition at line 67 of file testPloneFolder.py.

00067 
00068     def testSetObjectRaisesBadRequest(self):
00069         # _setObject() should raise zExceptions.BadRequest
00070         # on duplicate id.
00071         self.folder._setObject('foo', dummy.Item())
00072         try:
00073             self.folder._setObject('foo', dummy.Item())
00074         except BadRequest:
00075             pass


Member Data Documentation

Definition at line 65 of file testPloneFolder.py.


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