Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul Graydon
erp5
Commits
5028ae92
Commit
5028ae92
authored
May 25, 2021
by
Aurel
Committed by
Arnaud Fontaine
Jan 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
manage_delObject raise when no ids given
parent
0a0ac285
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
bt5/erp5_invoicing/TestTemplateItem/portal_components/test.erp5.testRule.py
.../TestTemplateItem/portal_components/test.erp5.testRule.py
+10
-3
bt5/erp5_trade/TestTemplateItem/portal_components/test.erp5.testInventory.py
...TemplateItem/portal_components/test.erp5.testInventory.py
+5
-1
No files found.
bt5/erp5_invoicing/TestTemplateItem/portal_components/test.erp5.testRule.py
View file @
5028ae92
...
...
@@ -29,6 +29,7 @@ import unittest
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.utils
import
createZODBPythonScript
from
erp5.component.test.testOrder
import
TestOrderMixin
from
zExceptions
import
BadRequest
class
TestRuleMixin
(
TestOrderMixin
):
"""
...
...
@@ -52,13 +53,19 @@ class TestRuleMixin(TestOrderMixin):
return
rule
def
_wipe
(
self
,
folder
):
try
:
folder
.
manage_delObjects
(
list
(
folder
.
objectIds
()))
except
BadRequest
:
pass
def
afterSetUp
(
self
):
# delete rules
rule_tool
=
self
.
portal
.
portal_rules
try
:
rule_tool
.
manage_delObjects
(
ids
=
[
x
.
getId
()
for
x
in
rule_tool
.
objectValues
()
if
x
.
getVersion
().
startswith
(
'testRule.'
)])
except
BadRequest
:
pass
# recreate rules
self
.
createRule
(
'default_order_rule'
,
'1'
)
self
.
createRule
(
'default_delivery_rule'
,
'1'
)
...
...
bt5/erp5_trade/TestTemplateItem/portal_components/test.erp5.testInventory.py
View file @
5028ae92
...
...
@@ -54,6 +54,7 @@ from erp5.component.test.testOrder import TestOrderMixin
from
Products.ERP5Form.Selection
import
DomainSelection
from
Products.ERP5Type.tests.utils
import
createZODBPythonScript
from
textwrap
import
dedent
from
zExceptions
import
BadRequest
class
TestInventory
(
TestOrderMixin
,
ERP5TypeTestCase
):
"""
...
...
@@ -115,7 +116,10 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
for
module
in
[
'portal_simulation'
,
'inventory_module'
]:
folder
=
self
.
portal
[
module
]
try
:
folder
.
manage_delObjects
(
list
(
folder
.
objectIds
()))
except
BadRequest
:
pass
self
.
portal
.
portal_skins
.
custom
.
manage_delObjects
(
list
(
self
.
portal
.
portal_skins
.
custom
.
objectIds
()))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment