Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testUploadFile
def testUploadImage
def DISABLED_testFileRenameKeepsExtension
def DISABLED_testImageRenameKeepsExtension
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Static Public Attributes

string file_id = 'File.2001-01-01.12345'
string image_id = 'Image.2001-01-01.12345'

Detailed Description

Definition at line 329 of file testContentTypeScripts.py.


Member Function Documentation

Definition at line 334 of file testContentTypeScripts.py.

00334 
00335     def afterSetUp(self):
00336         self.folder.invokeFactory('File', id=self.file_id)
00337         self.folder.invokeFactory('Image', id=self.image_id)
00338         transaction.savepoint(optimistic=True) # make rename work

Definition at line 347 of file testContentTypeScripts.py.

00347 
00348     def DISABLED_testFileRenameKeepsExtension(self):
00349         # XXX Wishful thinking
00350         self.folder[self.file_id].file_edit(id='barney')
00351         self.failUnless('barney.txt' in self.folder.objectIds())

Here is the call graph for this function:

Definition at line 352 of file testContentTypeScripts.py.

00352 
00353     def DISABLED_testImageRenameKeepsExtension(self):
00354         # XXX Wishful thinking
00355         self.folder[self.image_id].image_edit(id='barney')
00356         self.failUnless('barney.gif' in self.folder.objectIds())
00357 

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 339 of file testContentTypeScripts.py.

00339 
00340     def testUploadFile(self):
00341         self.folder[self.file_id].file_edit(file=dummy.File('fred.txt'))
00342         self.failUnless('fred.txt' in self.folder.objectIds())

Here is the call graph for this function:

Definition at line 343 of file testContentTypeScripts.py.

00343 
00344     def testUploadImage(self):
00345         self.folder[self.image_id].image_edit(file=dummy.Image('fred.gif'))
00346         self.failUnless('fred.gif' in self.folder.objectIds())

Here is the call graph for this function:


Member Data Documentation

string CMFPlone.tests.testContentTypeScripts.TestFileExtensions.file_id = 'File.2001-01-01.12345' [static]

Definition at line 331 of file testContentTypeScripts.py.

string CMFPlone.tests.testContentTypeScripts.TestFileExtensions.image_id = 'Image.2001-01-01.12345' [static]

Definition at line 332 of file testContentTypeScripts.py.


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