Esempio n. 1
0
 def test_virtual_hosting(self):
     app = self.layer['app']
     vhm = VirtualHostMonster()
     vhm.id = 'virtual_hosting'
     vhm.addToContainer(app)
     obj = self.traverse(path='/VirtualHostBase/http/localhost:8080/plone/VirtualHostRoot/')  # noqa
     self.assertTrue(isinstance(obj, Service), 'Not a service')
     del app['virtual_hosting']
Esempio n. 2
0
 def test_virtual_hosting(self):
     app = self.layer['app']
     vhm = VirtualHostMonster()
     vhm.id = 'virtual_hosting'
     vhm.addToContainer(app)
     obj = self.traverse(path='/VirtualHostBase/http/localhost:8080/plone/VirtualHostRoot/')  # noqa
     self.assertTrue(isinstance(obj, Service), 'Not a service')
     del app['virtual_hosting']
Esempio n. 3
0
 def install_virtual_hosting(self):
     app = self.getApp()
     if 'virtual_hosting' not in app:
         from Products.SiteAccess.VirtualHostMonster \
             import VirtualHostMonster
         vhm = VirtualHostMonster()
         vhm.id = 'virtual_hosting'
         vhm.addToContainer(app)
         self.commit('Added virtual_hosting')
Esempio n. 4
0
 def install_virtual_hosting(self):
     app = self.getApp()
     if 'virtual_hosting' not in app:
         from Products.SiteAccess.VirtualHostMonster \
             import VirtualHostMonster
         vhm = VirtualHostMonster()
         vhm.id = 'virtual_hosting'
         vhm.addToContainer(app)
         self.commit('Added virtual_hosting')
Esempio n. 5
0
 def test_virtual_hosting(self):
     app = self.layer["app"]
     vhm = VirtualHostMonster()
     vhm.id = "virtual_hosting"
     vhm.addToContainer(app)
     obj = self.traverse(
         path="/VirtualHostBase/http/localhost:8080/plone/VirtualHostRoot/"
     )  # noqa
     self.assertTrue(isinstance(obj, Service), "Not a service")
     del app["virtual_hosting"]
Esempio n. 6
0
 def install_virtual_hosting(self):
     app = self.getApp()
     if app._getInitializerFlag('virtual_hosting'):
         return
     if not app.objectIds('Virtual Host Monster') and not hasattr(app, 'virtual_hosting'):
         from Products.SiteAccess.VirtualHostMonster import VirtualHostMonster
         vhm=VirtualHostMonster()
         vhm.id='virtual_hosting'
         vhm.addToContainer(app)
         app._setInitializerFlag('virtual_hosting')
         self.commit('Added virtual_hosting')
 def install_virtual_hosting(self):
     app = self.getApp()
     if 'virtual_hosting' not in app:
         from Products.SiteAccess.VirtualHostMonster \
             import VirtualHostMonster
         any_vhm = [obj for obj in app.values()
                    if isinstance(obj, VirtualHostMonster)]
         if not any_vhm:
             vhm = VirtualHostMonster()
             vhm.id = 'virtual_hosting'
             vhm.addToContainer(app)
             self.commit('Added virtual_hosting')
Esempio n. 8
0
 def install_virtual_hosting(self):
     app = self.getApp()
     if 'virtual_hosting' not in app:
         from Products.SiteAccess.VirtualHostMonster \
             import VirtualHostMonster
         any_vhm = [obj for obj in app.values()
                    if isinstance(obj, VirtualHostMonster)]
         if not any_vhm:
             vhm = VirtualHostMonster()
             vhm.id = 'virtual_hosting'
             vhm.addToContainer(app)
             self.commit(u'Added virtual_hosting')
Esempio n. 9
0
 def install_virtual_hosting(self):
     app = self.getApp()
     if app._getInitializerFlag('virtual_hosting'):
         return
     if not app.objectIds('Virtual Host Monster') and not hasattr(
             app, 'virtual_hosting'):
         from Products.SiteAccess.VirtualHostMonster import VirtualHostMonster
         vhm = VirtualHostMonster()
         vhm.id = 'virtual_hosting'
         vhm.addToContainer(app)
         app._setInitializerFlag('virtual_hosting')
         self.commit('Added virtual_hosting')