Commit 8a5f4dc0 authored by Łukasz Nowak's avatar Łukasz Nowak

- removes hack by inverting logic - find portal object by checking objects

   meta type and then using such portal object to fetch its id


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37934 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f04bf3aa
......@@ -80,12 +80,15 @@ class ERP5TypeLiveTestCase(ProcessingNodeTestCase, PortalTestCase):
def getPortalName(self):
""" Return the default ERP5 site id.
"""
return 'erp5' # XXX-JPS For now a hack
return self.getPortalObject().getId()
def getPortal(self):
"""Returns the portal object, i.e. the "fixture root".
"""
return self.app[self.getPortalName()]
# Assumes that portal exists (which has sense) and that there is only one
# ERP5 site in Zope (which is always the case)
return [q for q in self.app.objectValues() if q.meta_type == 'ERP5 Site'
][0]
getPortalObject = getPortal
......
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