[#3970] Fixed 500 error on changing nhbd tracking ID, refactored test root controller

Signed-off-by: Cory Johns johnsca@geek.net

Cory Johns Cory Johns 2012-04-20

Jenny Steele Jenny Steele 2012-04-26

added Allura/allura/controllers/test_neighborhood_root.py
changed Allura/allura/model/auth.py
changed Allura/allura/tests/functional/test_neighborhood.py
changed Allura/development.ini
copied Allura/allura/controllers/test.py -> Allura/allura/controllers/test_project_root.py
Allura/allura/controllers/test_neighborhood_root.py Diff Switch to side-by-side view
Loading...
Allura/allura/model/auth.py Diff Switch to side-by-side view
Loading...
Allura/allura/tests/functional/test_neighborhood.py Diff Switch to side-by-side view
Loading...
Allura/development.ini Diff Switch to side-by-side view
Loading...
Allura/allura/controllers/test.py to Allura/allura/controllers/test_project_root.py
--- a/Allura/allura/controllers/test.py
+++ b/Allura/allura/controllers/test_project_root.py
@@ -30,13 +30,20 @@
 
 log = logging.getLogger(__name__)
 
-class TestController(WsgiDispatchController, ProjectController):
+class TestProjectRootController(WsgiDispatchController, ProjectController):
     '''Root controller for testing -- it behaves just like a
     ProjectController for test/ except that all tools are mounted,
     on-demand, at the mount point that is the same as their entry point
     name.
 
     Also, the test-admin is perpetually logged in here.
+
+    The name of this controller is dictated by the override_root setting
+    in development.ini and the magical import rules of TurboGears.  The
+    override_root setting has to match the name of this file, which has
+    to match (less underscores, case changes, and the addition of
+    "Controller") the name of this class.  It will then be registered
+    as the root controller instead of allura.controllers.root.RootController.
     '''
 
     def __init__(self):
@@ -53,7 +60,7 @@
             setattr(self, attr, getattr(proxy_root, attr))
         self.gsearch = proxy_root.search
         self.rest = RestController()
-        super(TestController, self).__init__()
+        super(TestProjectRootController, self).__init__()
 
     def _setup_request(self):
         # This code fixes a race condition in our tests