Commit 9365f1b4 authored by Aurel's avatar Aurel Committed by Arnaud Fontaine

manage_delObject raise if no args

parent d6c47282
...@@ -43,6 +43,8 @@ from MySQLdb import ProgrammingError ...@@ -43,6 +43,8 @@ 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
import six import six
class InventoryAPITestCase(ERP5TypeTestCase): class InventoryAPITestCase(ERP5TypeTestCase):
...@@ -130,8 +132,14 @@ class InventoryAPITestCase(ERP5TypeTestCase): ...@@ -130,8 +132,14 @@ class InventoryAPITestCase(ERP5TypeTestCase):
'inventory_module', 'inventory_module',
self.folder.getId() ]: self.folder.getId() ]:
folder = self.portal[module] folder = self.portal[module]
folder.manage_delObjects(list(folder.objectIds())) try:
self.portal.portal_skins.custom.manage_delObjects(list(self.portal.portal_skins.custom.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()))
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