예제 #1
0
 def testSimple(self):
     # SetUp according to Five's adapter test
     setUp()
     setupZCML()
     # Now we have a fixture that should work for adaptation
     adapted = IAdapted(Adaptable())
     self.assertEqual(adapted.adaptedMethod(), 'Adapted: The method')
예제 #2
0
 def testSimple(self):
     # SetUp according to Five's adapter test
     setUp()
     setupZCML()
     # Now we have a fixture that should work for adaptation
     adapted = IAdapted(Adaptable())
     self.assertEqual(adapted.adaptedMethod(), 'Adapted: The method')
예제 #3
0
def setUp(app):
    # enable zcml and site hooks
    placeless.setUp()
    import Products.Five
    from five import intid
    zcml.load_config('meta.zcml', Products.Five)
    zcml.load_config('configure.zcml', Products.Five)
    zcml.load_config('configure.zcml', intid)
    zcml.load_config('test.zcml', intid)
    setHooks()
예제 #4
0
def setUp(app):
    # turn on all needed zcml
    placeless.setUp()
    import Products.Five
    from Zope2.App import zcml
    from plone import relations
    zcml.load_config('meta.zcml', Products.Five)
    zcml.load_config('configure.zcml', Products.Five)
    zcml.load_config('configure.zcml', relations)
    # Make a site, turn on the local site hooks, add the five.intid utility
    from zope.site.hooks import setSite, setHooks
    if not USE_LSM:
        # monkey in our hooks
        from Products.Five.site.metaconfigure import classSiteHook
        from Products.Five.site.localsite import FiveSite
        from zope.interface import classImplements
        from zope.site.interfaces import IPossibleSite
        klass = app.__class__
        classSiteHook(klass, FiveSite)
        classImplements(klass, IPossibleSite)
    add_intids(app)
    setSite(app)
    setHooks()
    contentSetUp(app)
예제 #5
0
 def testAvailableCA(self):
     setUp()
     setupZCML()
     self.assertEqual(self.func(), True)