Beispiel #1
0
    def test_unhook_zca(self):
        from zope.component import getSiteManager

        def foo():
            '123'

        try:
            getSiteManager.sethook(foo)
            config = self._makeOne()
            config.unhook_zca()
            sm = getSiteManager()
            self.assertNotEqual(sm, '123')
        finally:
            getSiteManager.reset()
Beispiel #2
0
    def test_unhook_zca(self):
        from zope.component import getSiteManager

        def foo():
            '123'

        try:
            getSiteManager.sethook(foo)
            config = self._makeOne()
            config.unhook_zca()
            sm = getSiteManager()
            self.assertNotEqual(sm, '123')
        finally:
            getSiteManager.reset()