예제 #1
0
 def __init__(self, app, products, packages, users):
     AppInitializer.__init__(self, app)
     self.products = products
     self.packages = packages
     self.users = users
     self.installed_products = []
     self.installed_packages = []
예제 #2
0
    def test_encodeUrl_safe(self):
        from OFS.Application import AppInitializer
        init = AppInitializer(self.app)
        init.install_browser_id_manager()

        res = self.publish(
            '/browser_id_manager/encodeUrl?url=%3Chtml%3EEVIL%2Fhtml%3E%3C!--')
        self.assertFalse("<html>EVIL/html>" in res.getBody())
예제 #3
0
    def test_encodeUrl_safe(self):
        from OFS.Application import AppInitializer
        init = AppInitializer(self.app)
        init.install_browser_id_manager()

        res = self.publish(
            '/browser_id_manager/encodeUrl?url=%3Chtml%3EEVIL%2Fhtml%3E%3C!--')
        self.assertFalse("<html>EVIL/html>" in res.getBody())
예제 #4
0
    def setUpZope(self, app, configurationContext):

        import Products.CMFPlone
        xmlconfig.file(
            'configure.zcml',
            Products.CMFPlone,
            context=configurationContext
        )
        i = AppInitializer(app)
        i.install_virtual_hosting()
        z2.installProduct(app, 'Products.PageTemplates')
        i.install_standards()
        xmlconfig.file(
            'overrides.zcml',
            plone.cpanel,
            context=configurationContext
        )
예제 #5
0
 def getOne(self):
     app = getApp()
     return AppInitializer(app)