Chris McDonough wrote:
> Instead of calling config.load_zcml there, do whatever your application 
> does to configure itself in its run.py (often .scan()), e.g.:
> 
>    class ViewIntegrationTests(unittest.TestCase):
>        def setUp(self):
>            import myapp
>            self.config = Configurator(package=myapp)
>            self.config.begin()
>            self.config.scan()
> 
>        def tearDown(self):
>            """ Clear out the application registry """
>            self.config.end()

Indeed, but that's a bit anti-DRY...

I guess this would be an indicator of factoring out the imperative 
configuration into a function that took a config argument as its only 
parameter and could be called either form the tests or from the app setup?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to