Commit c58ca65b authored by Aurel's avatar Aurel

manage_delObject raise if no args

parent 9b160574
...@@ -43,6 +43,7 @@ from MySQLdb import ProgrammingError ...@@ -43,6 +43,7 @@ from MySQLdb import ProgrammingError
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.utils import reindex from Products.ERP5Type.tests.utils import reindex
from zExceptions import BadRequest
class InventoryAPITestCase(ERP5TypeTestCase): class InventoryAPITestCase(ERP5TypeTestCase):
"""Base class for Inventory API Tests {{{ """Base class for Inventory API Tests {{{
...@@ -129,8 +130,14 @@ class InventoryAPITestCase(ERP5TypeTestCase): ...@@ -129,8 +130,14 @@ class InventoryAPITestCase(ERP5TypeTestCase):
'inventory_module', 'inventory_module',
self.folder.getId() ]: self.folder.getId() ]:
folder = self.portal[module] folder = self.portal[module]
try:
folder.manage_delObjects(list(folder.objectIds())) folder.manage_delObjects(list(folder.objectIds()))
except BadRequest:
pass
try:
self.portal.portal_skins.custom.manage_delObjects(list(self.portal.portal_skins.custom.objectIds())) self.portal.portal_skins.custom.manage_delObjects(list(self.portal.portal_skins.custom.objectIds()))
except BadRequest:
pass
self.tic() self.tic()
......
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