Commit 1929d52f authored by Florent Guillaume's avatar Florent Guillaume

Make sure a virtual host monster is present in the application object.

parent 6ce37239
...@@ -26,8 +26,10 @@ class VHMRegressions(unittest.TestCase): ...@@ -26,8 +26,10 @@ class VHMRegressions(unittest.TestCase):
transaction.begin() transaction.begin()
self.app = makerequest(Zope2.app()) self.app = makerequest(Zope2.app())
try: try:
#self.app.manage_addProduct['SiteAccess'].manage_addVirtualHostMonster('VHM') if not hasattr(self.app, 'virtual_hosting'):
# now we have a VHM as virtual_hosting per default # If ZopeLite was imported, we have no default virtual host monster
from Products.SiteAccess.VirtualHostMonster import manage_addVirtualHostMonster
manage_addVirtualHostMonster(self.app, 'virtual_hosting')
self.app.manage_addFolder('folder') self.app.manage_addFolder('folder')
self.app.folder.manage_addDTMLMethod('doc', '') self.app.folder.manage_addDTMLMethod('doc', '')
self.app.REQUEST.set('PARENTS', [self.app]) self.app.REQUEST.set('PARENTS', [self.app])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment