Diff of /AlluraTesting/alluratest/controller.py [9a4a72] .. [22d026] Maximize Restore

  Switch to side-by-side view

--- a/AlluraTesting/alluratest/controller.py
+++ b/AlluraTesting/alluratest/controller.py
@@ -16,6 +16,7 @@
 import ming.orm
 
 from allura import model as M
+import allura.lib.security
 from allura.lib.app_globals import Globals
 from allura.websetup.schema import REGISTRY
 #from allura.lib.custom_middleware import environ as ENV, MagicalC
@@ -55,7 +56,8 @@
 
 def setup_unit_test():
     try:
-        REGISTRY.cleanup()
+        while True:
+            REGISTRY.cleanup()
     except:
         pass
     REGISTRY.prepare()
@@ -66,6 +68,7 @@
     REGISTRY.register(request, Request.blank('/', remote_addr='1.1.1.1'))
     REGISTRY.register(response, Response())
     REGISTRY.register(session, beaker.session.SessionObject({}))
+    REGISTRY.register(allura.credentials, allura.lib.security.Credentials())
     c.queued_messages = None
     ThreadLocalORMSession.close_all()