def shop(self): """Returns Shopping site root object :rtype: object provides collective.cart.core.interfaces.IShoppingSiteRoot """ context = aq_inner(self.context) chain = aq_chain(context) shops = [obj for obj in chain if IShoppingSiteRoot.providedBy(obj)] if shops: return shops[0]
def test_setuphandlers__provideIShoppingSiteRoot(self): from collective.cart.core.interfaces import IShoppingSiteRoot self.assertTrue(IShoppingSiteRoot.providedBy(self.portal))
def not_shopping_site(self): return IFolderish.providedBy( self.context) and not IShoppingSiteRoot.providedBy(self.context)