changeset 3875:3b1ab037ec09

cache action: adapt tests to put() not returning url any more
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 19 Jul 2008 13:43:51 +0200
parents 87b63ed39102
children 6b9d964c70dc
files MoinMoin/action/_tests/test_cache.py
diffstat 1 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/_tests/test_cache.py	Sat Jul 19 13:33:15 2008 +0200
+++ b/MoinMoin/action/_tests/test_cache.py	Sat Jul 19 13:43:51 2008 +0200
@@ -60,7 +60,8 @@
         request = self.request
         key = 'nooneknowsit'
         data = "dontcare"
-        url = cache.put(request, key, data)
+        cache.put(request, key, data)
+        url = cache.url(request, key)
 
         assert key in url
         meta_cache = caching.CacheEntry(request,
@@ -78,7 +79,8 @@
         key = 'nooneknowsit'
         filename = "test.png"
         data = "dontcare"
-        url = cache.put(request, key, data, filename=filename, last_modified=1)
+        cache.put(request, key, data, filename=filename, last_modified=1)
+        url = cache.url(request, key)
         assert key in url
 
         meta_cache = caching.CacheEntry(request,
@@ -97,7 +99,8 @@
         filename = "test.png"
         data = "dontcareatall"
         data_file = StringIO.StringIO(data)
-        url = cache.put(request, key, data_file)
+        cache.put(request, key, data_file)
+        url = cache.url(request, key)
 
         assert key in url
         meta_cache = caching.CacheEntry(request,
@@ -143,7 +146,8 @@
         rendered1 = render(source)
         key1 = keycalc(source)
 
-        url1 = cache.put(request, key1, rendered1)
+        cache.put(request, key1, rendered1)
+        url1 = cache.url(request, key1)
         assert 'key=%s' % key1 in url1
 
         data_cache = caching.CacheEntry(request,
@@ -160,7 +164,8 @@
         rendered2 = render(source)
         key2 = keycalc(source)
 
-        url2 = cache.put(request, key2, rendered2)
+        cache.put(request, key2, rendered2)
+        url2 = cache.url(request, key2)
         assert 'key=%s' % key2 in url2
 
         data_cache = caching.CacheEntry(request,