devtools/fake.py
changeset 8562 0d2fb4604265
parent 8316 d5b1b75805dd
child 8816 fe321c0f6d13
--- a/devtools/fake.py	Thu Sep 20 14:50:06 2012 +0200
+++ b/devtools/fake.py	Fri Sep 14 14:15:39 2012 +0200
@@ -155,6 +155,12 @@
     def set_entity_cache(self, entity):
         pass
 
+    def security_enabled(self, read=False, write=False):
+        class FakeCM(object):
+            def __enter__(self): pass
+            def __exit__(self, exctype, exc, traceback): pass
+        return FakeCM()
+
     # for use with enabled_security context manager
     read_security = write_security = True
     def init_security(self, *args):