[CMF-checkins] CVS: CMF/CMFCore/interfaces - CachingPolicyManager.py:1.3

Tres Seaver tseaver@zope.com
Wed, 3 Jul 2002 14:01:36 -0400


Update of /cvs-repository/CMF/CMFCore/interfaces
In directory cvs.zope.org:/tmp/cvs-serv11582/CMFCore/interfaces

Modified Files:
	CachingPolicyManager.py 
Log Message:


  - CMFCore/interfaces/CachingPolicyManager.py:
  
    o Update interface to account for optional 'time' parameter to
      'getHTTPCachingHeaders';  this parameter allows unit tests to run
      with predictable values, rather than being subject to vagaries of
      the clock.

  - CMFCore/tests/test_CachingPolicyManager.py:

    o Remove redundant test.

  - CMFCore/tests/tests_FS*.py:

    o Update dummy CP manager to fit revised interface.


=== CMF/CMFCore/interfaces/CachingPolicyManager.py 1.2 => 1.3 ===
     id = Attribute( 'id', 'Must be set to "caching_policy_manager"' )
 
-    def getHTTPCachingHeaders( content, view_method, keywords ):
+    def getHTTPCachingHeaders( content, view_method, keywords, time=None ):
         """
             Update HTTP caching headers in REQUEST based on 'content',
             'view_method', and 'keywords'.
+
+            If 'time' is supplied, use it instead of the current time
+            (for reliable testing).
         """