Commit bfcaf5ae authored by Ayush Tiwari's avatar Ayush Tiwari

erp5_catalog: Revert back monkeypatching of CatalogTool.getPath

Now as CatalogTool is a ERP5 object(BaseTool), we need CatalogTool.getPath
to direct to getPath function from Base class, so the best way was to change
the tests where it relied on CatalogTool.getPath to call getpath from ZSQLCatalog.
parent 14af02a6
......@@ -350,7 +350,6 @@ class CatalogTool (BaseTool, ZCatalog, CMFCoreCatalogTool):
# we use this function here to sometimes get objects to delete which if
# not solved of inheritance conflict might lead to catalog deletion.
getObject = ZCatalog.getObject
getPath = ZCatalog.getpath
def __init__(self):
ZCatalog.__init__(self, self.getId())
......
......@@ -89,7 +89,7 @@ class TestCopySupport(ERP5TypeTestCase):
person = self.portal.person_module.newContent(portal_type='Person',
address_city='Lille')
self.tic()
getPath = self.portal.portal_catalog.getPath
getPath = self.portal.portal_catalog.getpath
address = person.default_address
self.assertEqual(address.getPath(), getPath(address.getUid()))
person.recursiveReindexObject()
......
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