[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/Caching/tests - testICache.py:1.2

Albertas Agejevas alga@codeworks.lt
Thu, 31 Oct 2002 11:01:41 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/Caching/tests
In directory cvs.zope.org:/tmp/cvs-serv24574/tests

Modified Files:
	testICache.py 
Log Message:
A port of RAMCacheManager to Zope3.

The current architecture is very much based on the Zope2 RAMCacheManager,
so it might use some refactoring in the future.  For instance, two
different caching interfaces can be derived: one for the data (which does
not care for request) and one for the views (which treats request data in
some special way). The current implementation should work both ways.


=== Zope3/lib/python/Zope/App/Caching/tests/testICache.py 1.1 => 1.2 ===
--- Zope3/lib/python/Zope/App/Caching/tests/testICache.py:1.1	Thu Oct  3 05:50:40 2002
+++ Zope3/lib/python/Zope/App/Caching/tests/testICache.py	Thu Oct 31 11:01:40 2002
@@ -33,13 +33,13 @@
     def testCaching(self):
         """Verify basic caching"""
         cache = self._Test__new()
-        object = "obj"
+        ob = "obj"
         data = "data"
         marker = []
         self.failIf(cache.query(ob, default=marker) is not marker,
                     "empty cache should not contain anything")
 
-        cache.set(ob, view_name="view1")
+        cache.set(data, ob, view_name="view1")
         self.assertEquals(cache.query(ob, "view1"), data,
                     "should return cached result")
         self.failIf(cache.query(ob, "view2", default=marker) is not marker,
@@ -68,3 +68,7 @@
 
 if __name__=='__main__':
     main(defaultTest='test_suite')
+
+
+
+