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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastien Robin
erp5
Commits
5f346790
Commit
5f346790
authored
Sep 02, 2019
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: pass correct arguments to relation setter methods
parent
e51b8a82
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
13 deletions
+13
-13
product/ERP5/tests/testAccountingReports.py
product/ERP5/tests/testAccountingReports.py
+1
-1
product/ERP5/tests/testBPMCore.py
product/ERP5/tests/testBPMCore.py
+4
-4
product/ERP5/tests/testBusinessTemplate.py
product/ERP5/tests/testBusinessTemplate.py
+1
-1
product/ERP5/tests/testInventoryAPI.py
product/ERP5/tests/testInventoryAPI.py
+3
-3
product/ERP5/tests/testKM.py
product/ERP5/tests/testKM.py
+2
-2
product/ERP5Catalog/tests/testERP5CatalogSecurityUidOptimization.py
...P5Catalog/tests/testERP5CatalogSecurityUidOptimization.py
+2
-2
No files found.
product/ERP5/tests/testAccountingReports.py
View file @
5f346790
...
@@ -3297,7 +3297,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -3297,7 +3297,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
_makeOne
(
self
.
_makeOne
(
portal_type
=
'Accounting Transaction'
,
portal_type
=
'Accounting Transaction'
,
title
=
'Transaction in EUR (our currency)'
,
title
=
'Transaction in EUR (our currency)'
,
resource
_value
=
'currency_module/euro'
,
resource
=
'currency_module/euro'
,
source_reference
=
'1'
,
source_reference
=
'1'
,
simulation_state
=
'delivered'
,
simulation_state
=
'delivered'
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
...
...
product/ERP5/tests/testBPMCore.py
View file @
5f346790
...
@@ -94,18 +94,18 @@ class TestBPMMixin(ERP5TypeTestCase):
...
@@ -94,18 +94,18 @@ class TestBPMMixin(ERP5TypeTestCase):
if
create_order_to_invoice_path
:
if
create_order_to_invoice_path
:
self
.
createTradeModelPath
(
self
.
business_process
,
self
.
createTradeModelPath
(
self
.
business_process
,
reference
=
'order_path'
,
reference
=
'order_path'
,
trade_phase_
value_
list
=
(
'default/order'
,))
trade_phase_list
=
(
'default/order'
,))
self
.
createTradeModelPath
(
self
.
business_process
,
self
.
createTradeModelPath
(
self
.
business_process
,
reference
=
'delivery_path'
,
reference
=
'delivery_path'
,
trade_phase_
value_
list
=
(
'default/delivery'
,),
trade_phase_list
=
(
'default/delivery'
,),
trade_date
=
'trade_phase/default/order'
)
trade_date
=
'trade_phase/default/order'
)
self
.
createTradeModelPath
(
self
.
business_process
,
self
.
createTradeModelPath
(
self
.
business_process
,
reference
=
'invoice_path'
,
reference
=
'invoice_path'
,
trade_phase_
value_
list
=
(
'default/invoicing'
,),
trade_phase_list
=
(
'default/invoicing'
,),
trade_date
=
'trade_phase/default/delivery'
)
trade_date
=
'trade_phase/default/delivery'
)
self
.
createTradeModelPath
(
business_process
,
self
.
createTradeModelPath
(
business_process
,
reference
=
'default_path'
,
reference
=
'default_path'
,
trade_phase_
value_
list
=
(
'default/discount'
,
'default/tax'
),
trade_phase_list
=
(
'default/discount'
,
'default/tax'
),
trade_date
=
'trade_phase/default/invoicing'
)
trade_date
=
'trade_phase/default/invoicing'
)
# A trade model path already exist for root simulation movements
# A trade model path already exist for root simulation movements
# (Accounting Transaction Root Simulation Rule).
# (Accounting Transaction Root Simulation Rule).
...
...
product/ERP5/tests/testBusinessTemplate.py
View file @
5f346790
...
@@ -6765,7 +6765,7 @@ class TestBusinessTemplate(BusinessTemplateMixin):
...
@@ -6765,7 +6765,7 @@ class TestBusinessTemplate(BusinessTemplateMixin):
# we simulated above, but we just want to test that an exported role
# we simulated above, but we just want to test that an exported role
# information can be imported back
# information can be imported back
object_type
.
newContent
(
portal_type
=
'Role Information'
,
object_type
.
newContent
(
portal_type
=
'Role Information'
,
local_role_group_value
=
self
.
portal
.
portal_categories
.
local_role_group
.
Alternate
.
getRelativeUrl
()
,
local_role_group_value
=
self
.
portal
.
portal_categories
.
local_role_group
.
Alternate
,
role_name_list
=
(
'Assignee'
,
))
role_name_list
=
(
'Assignee'
,
))
bt
=
self
.
portal
.
portal_templates
.
newContent
(
bt
=
self
.
portal
.
portal_templates
.
newContent
(
...
...
product/ERP5/tests/testInventoryAPI.py
View file @
5f346790
...
@@ -2818,15 +2818,15 @@ class TestTrackingList(InventoryAPITestCase):
...
@@ -2818,15 +2818,15 @@ class TestTrackingList(InventoryAPITestCase):
node_b
=
self
.
_makeOrganisation
(
title
=
'Node B'
)
node_b
=
self
.
_makeOrganisation
(
title
=
'Node B'
)
node_c
=
self
.
_makeOrganisation
(
title
=
'Node C'
)
node_c
=
self
.
_makeOrganisation
(
title
=
'Node C'
)
movement_a
=
self
.
_makeMovement
(
source_value
=
node_a
,
movement_a
=
self
.
_makeMovement
(
source_value
=
node_a
,
destination_value
=
node_b
,
resource
=
self
.
resource
,
destination_value
=
node_b
,
resource
=
self
.
resource
.
getRelativeUrl
()
,
quantity
=
1
,
aggregate_value
=
item_a
,
start_date
=
now
,
quantity
=
1
,
aggregate_value
=
item_a
,
start_date
=
now
,
simulation_state
=
state_a
)
simulation_state
=
state_a
)
movement_b
=
self
.
_makeMovement
(
source_value
=
node_b
,
movement_b
=
self
.
_makeMovement
(
source_value
=
node_b
,
destination_value
=
node_c
,
resource
=
self
.
resource
,
destination_value
=
node_c
,
resource
=
self
.
resource
.
getRelativeUrl
()
,
quantity
=
1
,
aggregate_value
=
item_a
,
start_date
=
now
+
1
,
quantity
=
1
,
aggregate_value
=
item_a
,
start_date
=
now
+
1
,
simulation_state
=
state_b
)
simulation_state
=
state_b
)
movement_c
=
self
.
_makeMovement
(
source_value
=
node_a
,
movement_c
=
self
.
_makeMovement
(
source_value
=
node_a
,
destination_value
=
node_b
,
resource
=
self
.
resource
,
destination_value
=
node_b
,
resource
=
self
.
resource
.
getRelativeUrl
()
,
quantity
=
1
,
aggregate_value
=
item_b
,
start_date
=
now
+
1
,
quantity
=
1
,
aggregate_value
=
item_b
,
start_date
=
now
+
1
,
simulation_state
=
state_c
)
simulation_state
=
state_c
)
self
.
tic
()
self
.
tic
()
...
...
product/ERP5/tests/testKM.py
View file @
5f346790
...
@@ -298,7 +298,7 @@ class TestKM(TestKMMixIn):
...
@@ -298,7 +298,7 @@ class TestKM(TestKMMixIn):
# Web Section mode
# Web Section mode
websection_knowledge_pad
=
user_pref
.
newContent
(
portal_type
=
'Knowledge Pad'
,
websection_knowledge_pad
=
user_pref
.
newContent
(
portal_type
=
'Knowledge Pad'
,
title
=
"web_section"
)
title
=
"web_section"
)
websection_knowledge_pad
.
setGroup
Value
(
default_pad_group
)
websection_knowledge_pad
.
setGroup
(
default_pad_group
)
websection_knowledge_pad1
=
websection_knowledge_pad
.
newContent
(
\
websection_knowledge_pad1
=
websection_knowledge_pad
.
newContent
(
\
portal_type
=
'Knowledge Box'
,
portal_type
=
'Knowledge Box'
,
title
=
"web_section_1"
)
title
=
"web_section_1"
)
...
@@ -311,7 +311,7 @@ class TestKM(TestKMMixIn):
...
@@ -311,7 +311,7 @@ class TestKM(TestKMMixIn):
websection_content_knowledge_pad
=
user_pref
.
newContent
(
\
websection_content_knowledge_pad
=
user_pref
.
newContent
(
\
portal_type
=
'Knowledge Pad'
,
\
portal_type
=
'Knowledge Pad'
,
\
title
=
"web_section_content"
)
title
=
"web_section_content"
)
websection_content_knowledge_pad
.
setGroup
Value
(
default_pad_group_section_content_title
)
websection_content_knowledge_pad
.
setGroup
(
default_pad_group_section_content_title
)
websection_content_knowledge_pad1
=
websection_content_knowledge_pad
.
newContent
(
\
websection_content_knowledge_pad1
=
websection_content_knowledge_pad
.
newContent
(
\
portal_type
=
'Knowledge Box'
,
\
portal_type
=
'Knowledge Box'
,
\
title
=
"web_section_content_1"
)
title
=
"web_section_content_1"
)
...
...
product/ERP5Catalog/tests/testERP5CatalogSecurityUidOptimization.py
View file @
5f346790
...
@@ -110,14 +110,14 @@ CREATE TABLE alternate_roles_and_users (
...
@@ -110,14 +110,14 @@ CREATE TABLE alternate_roles_and_users (
role_name
=
'Auditor'
,
role_name
=
'Auditor'
,
role_base_category_script_id
=
'ERP5Type_getSecurityCategoryFromSelf'
,
role_base_category_script_id
=
'ERP5Type_getSecurityCategoryFromSelf'
,
role_base_category
=
'agent'
,
role_base_category
=
'agent'
,
local_role_group_value
=
self
.
portal
.
portal_categories
.
local_role_group
.
Alternate
.
getRelativeUrl
()
)
local_role_group_value
=
self
.
portal
.
portal_categories
.
local_role_group
.
Alternate
)
# add another role information that does not grant view permission
# add another role information that does not grant view permission
self
.
portal
.
portal_types
.
Person
.
newContent
(
self
.
portal
.
portal_types
.
Person
.
newContent
(
portal_type
=
'Role Information'
,
portal_type
=
'Role Information'
,
role_name
=
'Unknown'
,
role_name
=
'Unknown'
,
role_category_list
=
(
'group/g1'
),
role_category_list
=
(
'group/g1'
),
role_base_category
=
'group'
,
role_base_category
=
'group'
,
local_role_group_value
=
self
.
portal
.
portal_categories
.
local_role_group
.
Alternate
.
getRelativeUrl
()
)
local_role_group_value
=
self
.
portal
.
portal_categories
.
local_role_group
.
Alternate
)
self
.
portal
.
portal_caches
.
clearAllCache
()
self
.
portal
.
portal_caches
.
clearAllCache
()
self
.
tic
()
self
.
tic
()
...
...
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