devtools/fake.py
changeset 7356 73d7863d97c1
parent 7232 506a0af77cee
child 7360 dbff01dd3c3c
--- a/devtools/fake.py	Tue May 10 16:23:48 2011 +0200
+++ b/devtools/fake.py	Tue May 10 18:17:55 2011 +0200
@@ -138,8 +138,6 @@
 
 
 class FakeSession(RequestSessionBase):
-    read_security = write_security = True
-    set_read_security = set_write_security = lambda *args, **kwargs: None
 
     def __init__(self, repo=None, user=None):
         self.repo = repo
@@ -162,6 +160,13 @@
     def set_entity_cache(self, entity):
         pass
 
+    # for use with enabled_security context manager
+    read_security = write_security = True
+    def init_security(self, *args):
+        return None, None
+    def reset_security(self, *args):
+        return
+
 class FakeRepo(object):
     querier = None
     def __init__(self, schema, vreg=None, config=None):