Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testDocumentMetadata
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 basic_auth
 folder_path

Detailed Description

Definition at line 32 of file testWebDAV.py.


Member Function Documentation

Definition at line 36 of file testWebDAV.py.

00036 
00037     def afterSetUp(self):
00038         self.basic_auth = '%s:%s' % (default_user, default_password)
00039         self.folder_path = self.folder.absolute_url(1)

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 40 of file testWebDAV.py.

00040 
00041     def testDocumentMetadata(self):
00042         response = self.publish(self.folder_path+'/doc',
00043                                 env={'CONTENT_TYPE': 'text/html'},
00044                                 request_method='PUT',
00045                                 stdin=StringIO(html),
00046                                 basic=self.basic_auth)
00047         self.assertEqual(response.getStatus(), 201)
00048         doc = self.folder.doc
00049         self.assertEqual(doc.Title(), 'Foo')
00050         self.assertEqual(doc.EditableBody(), 'Bar')
00051         self.assertEqual(doc.Format(), 'text/html')
00052         # Remaining elements should contain the defaults
00053         self.assertEqual(doc.Description(), '')
00054         self.assertEqual(doc.Subject(), ())
00055         self.assertEqual(doc.Contributors(), ())
00056         self.assertEqual(doc.EffectiveDate(), 'None')
00057         self.assertEqual(doc.ExpirationDate(), 'None')
00058         self.assertEqual(doc.Language(), '')
00059         self.assertEqual(doc.Rights(), '')
00060 


Member Data Documentation

Definition at line 37 of file testWebDAV.py.

Definition at line 38 of file testWebDAV.py.


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