Back to index

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

List of all members.

Public Member Functions

def test_normal

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 188 of file test_cachingpolicymgr.py.


Member Function Documentation

Definition at line 192 of file test_cachingpolicymgr.py.

00192 
00193     def test_normal(self):
00194         from Products.CMFCore.exportimport.cachingpolicymgr \
00195                 import importCachingPolicyManager
00196 
00197         site = self._initSite(with_policy=False)
00198         cpm = site.caching_policy_manager
00199         self.assertEqual(len(cpm.listPolicies()), 0)
00200 
00201         context = DummyImportContext(site)
00202         context._files['cachingpolicymgr.xml'] = self._WITH_POLICY_EXPORT
00203         importCachingPolicyManager(context)
00204 
00205         self.assertEqual(len(cpm.listPolicies()), 1)
00206         policy_id, policy = cpm.listPolicies()[0]
00207         self.assertEqual(policy.getPolicyId(), self.POLICY_ID)
00208         self.assertEqual(policy.getPredicate(), self.PREDICATE)
00209         self.assertEqual(policy.getMTimeFunc(), self.MTIME_FUNC)
00210         self.assertEqual(policy.getVary(), self.VARY)
00211         self.assertEqual(policy.getETagFunc(), self.ETAG_FUNC)
00212         self.assertEqual(policy.getMaxAgeSecs(), self.MAX_AGE_SECS)
00213         self.assertEqual(policy.getSMaxAgeSecs(), self.S_MAX_AGE_SECS)
00214         self.assertEqual(policy.getPreCheck(), self.PRE_CHECK)
00215         self.assertEqual(policy.getPostCheck(), self.POST_CHECK)
00216         self.assertEqual(policy.getLastModified(), False)
00217         self.assertEqual(policy.getNoCache(), True)
00218         self.assertEqual(policy.getNoStore(), True)
00219         self.assertEqual(policy.getMustRevalidate(), True)
00220         self.assertEqual(policy.getProxyRevalidate(), True)
00221         self.assertEqual(policy.getNoTransform(), True)
00222         self.assertEqual(policy.getPublic(), True)
00223         self.assertEqual(policy.getPrivate(), True)
00224         self.assertEqual(policy.getEnable304s(), True)
00225 

Here is the call graph for this function:


Member Data Documentation

Definition at line 100 of file test_cachingpolicymgr.py.

Definition at line 190 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: