Hi, I have some custom middleware that is intended to use the same ZCA
registry as my bfg app. I've altered the run.py in the bfg app to tell it to
use the global site manager, and the middleware looks up utilities by doing

self.gsm = getGlobalSiteManager()
self.gsm.queryUtility etc

This is all working fine for the app. But recently my isolated tests stopped
working. I know the environment is different now, new bfg, newer release of
zope.component, but I can't figure out how to make them work anymore. I want
the following to give me a registry populated from the configure.zcml file
in the pets packag, but instead it seems to be empty:

 def test_gsm_setup(self):
        "test_gsm_setup - test that we can setup a zca registry from the
model file"
        import pets
        xmlconfig.file('configure.zcml', package=pets)
        gsm = getGlobalSiteManager()
        assert sm._utility_registrations

If anyone can point me at docs or tutorials or suggest what I am doing wrong
that would be great.

Repoze-dev mailing list

Reply via email to