diff MoinMoin/_tests/test_user.py @ 6025:05a6897ee496

"userdir" caching scope: use it for userid lookup caches, reduce code duplication For same reasons (see previous changesets), we need to use the "userdir" scope for the name2id / openid2id lookup caches, too.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 12 Feb 2014 12:07:22 +0100
parents 25900eaeb864
children 1893da1d5213
line wrap: on
line diff
--- a/MoinMoin/_tests/test_user.py	Wed Feb 12 01:15:00 2014 +0100
+++ b/MoinMoin/_tests/test_user.py	Wed Feb 12 12:07:22 2014 +0100
@@ -77,12 +77,8 @@
         self.request.cookies = self.saved_cookie
         self.request.user = self.saved_user
 
-        # Remove user name to id cache, or next test will fail
-        caching.CacheEntry(self.request, 'user', 'name2id', scope='wiki').remove()
-        try:
-            del self.request.cfg.cache.name2id
-        except:
-            pass
+        # Remove user lookup caches, or next test will fail
+        user.clearUserIdLookupCaches(self.request)
 
     def testAsciiPassword(self):
         """ user: login with ascii password """