is there a way to obtain a reference to the root-controller-object so that I
can attach a hierarchy of test-only controllers to it?
This is TG2 of course.
Diez
I finally did.
Assuming the paster-stuff is bootstrapped through code like
here_dir = os.path.dirname(os.path.abspath(ableton.__file__))
conf_dir = os.path.dirname(here_dir)
wsgiapp = loadapp('config:test.ini', relative_to=conf_dir)
you then can do it simply like this (inside a function/method!!)
import myproject.controllers.root as root
root.RootController.mountpoint = TestController()
Then you can access the controller through the usual
self.app.get("/mountpoint/action")
Of course mounting of whole controller hierarchies is perfectly fine.
So I create a function in our base-test-class that allows to register a passed
controller for a given mountpoint. Voila, greatness ensues.
Diez