devtools/fake.py
changeset 8562 0d2fb4604265
parent 8316 d5b1b75805dd
child 8816 fe321c0f6d13
equal deleted inserted replaced
8561:77ea3eed9946 8562:0d2fb4604265
   153         pass
   153         pass
   154 
   154 
   155     def set_entity_cache(self, entity):
   155     def set_entity_cache(self, entity):
   156         pass
   156         pass
   157 
   157 
       
   158     def security_enabled(self, read=False, write=False):
       
   159         class FakeCM(object):
       
   160             def __enter__(self): pass
       
   161             def __exit__(self, exctype, exc, traceback): pass
       
   162         return FakeCM()
       
   163 
   158     # for use with enabled_security context manager
   164     # for use with enabled_security context manager
   159     read_security = write_security = True
   165     read_security = write_security = True
   160     def init_security(self, *args):
   166     def init_security(self, *args):
   161         return None, None
   167         return None, None
   162     def reset_security(self, *args):
   168     def reset_security(self, *args):