def test_ctor_implicit_context(self): siteSetUp() site = BTreeFolder2('site') createSiteManager(site, setsite=True) root = self._makeOne().context site._setOb('portal_resources', root) try: dir = PersistentResourceDirectory() # context should be stored unwrapped self.assertTrue(aq_base(root) is dir.context) # but re-wrapped during traversal traversed = dir['demo'] self.assertTrue(site in traversed.context.aq_chain) finally: siteTearDown()
def test_ctor_implicit_context(self): from zope.site.testing import siteSetUp, createSiteManager, siteTearDown siteSetUp() site = BTreeFolder2('site') createSiteManager(site, setsite=True) root = self._makeOne().context site._setOb('portal_resources', root) from plone.resource.directory import PersistentResourceDirectory try: dir = PersistentResourceDirectory() # context should be stored unwrapped self.assertTrue(aq_base(root) is dir.context) # but re-wrapped during traversal traversed = dir['demo'] self.assertTrue(site in traversed.context.aq_chain) finally: siteTearDown()
def tearDown(test): siteTearDown()
def tearDown(test=None): siteTearDown()
def tearDown(test): testing.siteTearDown()
def tearDown(self): testing.siteTearDown()
def tearDown(self): siteTearDown()
def tearDown(test): zope.security.management.endInteraction() siteTearDown()