def test_enable_site(self): """Event handler should have configured local sitemanager.""" mnet = self.portal['maastricht'] self.assertTrue(ISite.providedBy(mnet)) self.assertTrue(IObjectManagerSite.providedBy(mnet)) self.assertNotEquals(self.portal.getSiteManager(), mnet.getSiteManager())
def makeSite(self): if IObjectManagerSite.providedBy(self.context): raise ValueError('This is already a site') enableSite(self.context, iface=IObjectManagerSite) #TODO in the future we'll have to walk up to other site # managers and put them in the bases components = PersistentComponents() components.__bases__ = (base,) self.context.setSiteManager(components)
def makeSite(self): if IObjectManagerSite.providedBy(self.context): raise ValueError('This is already a site') enableSite(self.context, iface=IObjectManagerSite) #TODO in the future we'll have to walk up to other site # managers and put them in the bases components = PersistentComponents() components.__bases__ = (base,) self.context.setSiteManager(components)
def isSite(self): return IObjectManagerSite.providedBy(self.context)
def isSite(self): return IObjectManagerSite.providedBy(self.context)
def _isLocalSite(container): try: return IObjectManagerSite.providedBy(container) except: return False