Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes
CMFCore.exportimport.tests.test_cachingpolicymgr.exportCachingPolicyManagerTests Class Reference
Inheritance diagram for CMFCore.exportimport.tests.test_cachingpolicymgr.exportCachingPolicyManagerTests:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.exportimport.tests.test_cachingpolicymgr.exportCachingPolicyManagerTests:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_empty
def test_with_policy

Static Public Attributes

 layer = ExportImportZCMLLayer
string POLICY_ID = 'policy_id'
string PREDICATE = "python:object.getId() == 'foo'"
string MTIME_FUNC = "object/modified"
int MAX_AGE_SECS = 60
string VARY = "Test"
string ETAG_FUNC = "object/getETag"
int S_MAX_AGE_SECS = 120
int PRE_CHECK = 42
int POST_CHECK = 43

Detailed Description

Definition at line 155 of file test_cachingpolicymgr.py.


Member Function Documentation

Definition at line 159 of file test_cachingpolicymgr.py.

00159 
00160     def test_empty(self):
00161         from Products.CMFCore.exportimport.cachingpolicymgr \
00162                 import exportCachingPolicyManager
00163 
00164         site = self._initSite(with_policy=False)
00165         context = DummyExportContext(site)
00166         exportCachingPolicyManager(context)
00167 
00168         self.assertEqual(len(context._wrote), 1)
00169         filename, text, content_type = context._wrote[0]
00170         self.assertEqual(filename, 'cachingpolicymgr.xml')
00171         self._compareDOM(text, self._EMPTY_EXPORT)
00172         self.assertEqual(content_type, 'text/xml')

Here is the call graph for this function:

Definition at line 173 of file test_cachingpolicymgr.py.

00173 
00174     def test_with_policy(self):
00175         from Products.CMFCore.exportimport.cachingpolicymgr \
00176                 import exportCachingPolicyManager
00177 
00178         site = self._initSite(with_policy=True)
00179         context = DummyExportContext(site)
00180         exportCachingPolicyManager(context)
00181 
00182         self.assertEqual(len(context._wrote), 1)
00183         filename, text, content_type = context._wrote[0]
00184         self.assertEqual(filename, 'cachingpolicymgr.xml')
00185         self._compareDOM(text, self._WITH_POLICY_EXPORT)
00186         self.assertEqual(content_type, 'text/xml')
00187 

Here is the call graph for this function:


Member Data Documentation

Definition at line 100 of file test_cachingpolicymgr.py.

Definition at line 157 of file test_cachingpolicymgr.py.

Definition at line 98 of file test_cachingpolicymgr.py.

Definition at line 97 of file test_cachingpolicymgr.py.

Definition at line 95 of file test_cachingpolicymgr.py.

Definition at line 103 of file test_cachingpolicymgr.py.

Definition at line 102 of file test_cachingpolicymgr.py.

string CMFCore.exportimport.tests.test_cachingpolicymgr._CachingPolicyManagerSetup.PREDICATE = "python:object.getId() == 'foo'" [static, inherited]

Definition at line 96 of file test_cachingpolicymgr.py.

Definition at line 101 of file test_cachingpolicymgr.py.

Definition at line 99 of file test_cachingpolicymgr.py.


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