Example #1
0
    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()
Example #2
0
    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()
Example #3
0
def tearDown(test):
    siteTearDown()
def tearDown(test=None):
    siteTearDown()
def tearDown(test=None):
    siteTearDown()
Example #6
0
def tearDown(test):
    testing.siteTearDown()
Example #7
0
def tearDown(test):
    testing.siteTearDown()
Example #8
0
 def tearDown(self):
     testing.siteTearDown()
Example #9
0
 def tearDown(self):
     siteTearDown()
Example #10
0
def tearDown(test):
    zope.security.management.endInteraction()
    siteTearDown()
Example #11
0
def tearDown(test):
    siteTearDown()