Commits

Anonymous committed 2906bf7

Make FakeId global

  • Participants
  • Parent commits 9295d0e

Comments (0)

Files changed (1)

File drink/__init__.py

         except UnicodeError:
             return txt.decode('latin1')
 
+class FakeId(object):
+    user = None
+
+    def access(self, obj):
+        return 'rowat'
+
 def init():
     """ Re-initialize drink's database """
     from drink.objects.finder import reset
 
         from .objects import users as obj
 
-        class FakeId(object):
-            user = None
-
-            def access(self, obj):
-                return 'rowat'
 
         request.identity = FakeId()
         groups = root['groups'] = obj.GroupList('groups', '/')