[CMF-checkins] CVS: CMF/CMFCore/tests - test_CachingPolicyManager.py:1.3.2.3
Tres Seaver
tseaver@zope.com
Wed, 10 Apr 2002 14:16:33 -0400
Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv15757/CMFCore/tests
Modified Files:
Tag: CMF-1_3-branch
test_CachingPolicyManager.py
Log Message:
- Further unscrew time-sensitive tests for CachingPolicyManager.
=== CMF/CMFCore/tests/test_CachingPolicyManager.py 1.3.2.2 => 1.3.2.3 ===
from Products.CMFCore.CachingPolicyManager import createCPContext
- from Products.CMFCore.CachingPolicyManager import createCPContext
return createCPContext( DummyContent(self._epoch)
, 'foo_view', kw, self._epoch )
@@ -253,6 +252,7 @@
headers = mgr.getHTTPCachingHeaders( content=DummyContent(self._epoch)
, view_method='foo_view'
, keywords={}
+ , time=self._epoch
)
self.assertEqual( len( headers ), 0 )
@@ -268,6 +268,7 @@
headers = mgr.getHTTPCachingHeaders( content=DummyContent(self._epoch)
, view_method='foo_view'
, keywords={}
+ , time=self._epoch
)
self.assertEqual( len( headers ), 3 )
self.assertEqual( headers[0][0].lower() , 'last-modified' )
@@ -321,6 +322,7 @@
headers = mgr.getHTTPCachingHeaders( content=DummyContent(self._epoch)
, view_method='foo_view'
, keywords={}
+ , time=self._epoch
)
self.assertEqual( len( headers ), 0 )
@@ -330,6 +332,7 @@
headers = mgr.getHTTPCachingHeaders( content=DummyContent(self._epoch)
, view_method='foo_view'
, keywords={ 'foo' : 1 }
+ , time=self._epoch
)
self.assertEqual( len( headers ), 1 )
self.assertEqual( headers[0][0].lower(), 'last-modified' )
@@ -343,6 +346,7 @@
headers = mgr.getHTTPCachingHeaders( content=DummyContent(self._epoch)
, view_method='foo_view'
, keywords={ 'bar' : 1 }
+ , time=self._epoch
)
self.assertEqual( len( headers ), 3 )
self.assertEqual( headers[0][0].lower() , 'last-modified' )
@@ -361,6 +365,7 @@
headers = mgr.getHTTPCachingHeaders( content=DummyContent(self._epoch)
, view_method='foo_view'
, keywords={ 'baz' : 1 }
+ , time=self._epoch
)
self.assertEqual( len( headers ), 3 )
self.assertEqual( headers[0][0].lower() , 'last-modified' )
@@ -382,6 +387,7 @@
headers = mgr.getHTTPCachingHeaders( content=DummyContent(self._epoch)
, view_method='foo_view'
, keywords={ 'qux' : 1 }
+ , time=self._epoch
)
self.assertEqual( len( headers ), 3 )
self.assertEqual( headers[0][0].lower() , 'last-modified' )