[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Content/SQLScript/tests - testSQLScript.py:1.7

Albertas Agejevas alga@codeworks.lt
Mon, 25 Nov 2002 08:48:08 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Content/SQLScript/tests
In directory cvs.zope.org:/tmp/cvs-serv25234/OFS/Content/SQLScript/tests

Modified Files:
	testSQLScript.py 
Log Message:
Cleaned up the RAMCache.

Removed all the references to Request from RAMCache, removed 'view' parameters
from the ICache interface.


=== Zope3/lib/python/Zope/App/OFS/Content/SQLScript/tests/testSQLScript.py 1.6 => 1.7 ===
--- Zope3/lib/python/Zope/App/OFS/Content/SQLScript/tests/testSQLScript.py:1.6	Mon Oct  7 05:54:39 2002
+++ Zope3/lib/python/Zope/App/OFS/Content/SQLScript/tests/testSQLScript.py	Mon Nov 25 08:48:07 2002
@@ -82,19 +82,19 @@
     def __init__(self):
         self.cache = {}
 
-    def set(self, data, obj, view_name="", keywords=None, mtime_func=None):
-        if keywords:
-            keywords = keywords.items()
+    def set(self, data, obj, key=None):
+        if key:
+            keywords = key.items()
             keywords.sort()
             keywords = tuple(keywords)
-        self.cache[obj, view_name, keywords] = data
+        self.cache[obj, keywords] = data
 
-    def query(self, obj, view_name="", keywords=None, mtime_func=None, default=None):
-        if keywords:
-            keywords = keywords.items()
+    def query(self, obj, key=None, default=None):
+        if key:
+            keywords = key.items()
             keywords.sort()
             keywords = tuple(keywords)
-        return self.cache.get((obj, view_name, keywords), default)
+        return self.cache.get((obj, keywords), default)
 
 
 class CachingServiceStub: