Commit f70e2bbd authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: test: assignments are automaticall created when creating a virtual master

parent 974bf313
......@@ -276,9 +276,6 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
]
)
# first slapos administrator assignment can only be created by
# the erp5 manager
self.addProjectProductionManagerAssignment(owner_person, project)
self.tic()
self.logout()
......@@ -362,7 +359,7 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
# 1 credential request
# 1 instance tree
# 3 open sale order XXX * 2 why
# 2 assignment
# 3 assignment
# 3 simulation movement
# 3 sale packing list / line
# 2 sale trade condition ( a 3rd trade condition is not linked to the project)
......@@ -370,7 +367,7 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
# 1 software instance
# 1 software product
# 3 subscription request
self.assertRelatedObjectCount(project, 28)
self.assertRelatedObjectCount(project, 29)
self.checkERP5StateBeforeExit()
......@@ -428,10 +425,6 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
reference=owner_reference).getParentValue()
#owner_person.setCareerSubordinationValue(seller_organisation)
"""
# first slapos administrator assignment can only be created by
# the erp5 manager
self.addProjectProductionManagerAssignment(owner_person, project)"""
self.tic()
# hooray, now it is time to create compute_nodes
......@@ -504,9 +497,6 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
portal_type="ERP5 Login",
reference=owner_reference).getParentValue()
# first slapos administrator assignment can only be created by
# the erp5 manager
self.addProjectProductionManagerAssignment(owner_person, project)
self.tic()
# hooray, now it is time to create compute_nodes
......@@ -607,7 +597,7 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
# 2 credential request
# 1 instance tree
# 6 open sale order / line
# 3 (can reduce to 2) assignment
# 4 (can reduce to 2) assignment
# 16 simulation mvt
# 3 packing list / line
# 4 sale supply / line
......@@ -616,7 +606,7 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
# 1 software instance
# 1 software product
# 3 subscription requests
self.assertRelatedObjectCount(project, 50)
self.assertRelatedObjectCount(project, 51)
self.checkERP5StateBeforeExit()
......@@ -656,9 +646,6 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
'destination_project/%s' % project.getRelativeUrl()
]
)
# first slapos administrator assignment can only be created by
# the erp5 manager
self.addProjectProductionManagerAssignment(owner_person, project)
self.tic()
# hooray, now it is time to create compute_nodes
......@@ -759,7 +746,7 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
# 1 credential request
# 2 instance tree
# 9 open sale order / line
# 2 assignment
# 3 assignment
# 4 simulation movement
# 4 sale packing list
# 2 sale trade condition
......@@ -767,7 +754,7 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
# 2 software instance
# 2 software product
# 4 subscription request
self.assertRelatedObjectCount(project, 41)
self.assertRelatedObjectCount(project, 42)
self.checkERP5StateBeforeExit()
......@@ -807,9 +794,6 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
'destination_project/%s' % project.getRelativeUrl()
]
)
# first slapos administrator assignment can only be created by
# the erp5 manager
self.addProjectProductionManagerAssignment(owner_person, project)
self.tic()
# hooray, now it is time to create compute_nodes
......@@ -877,7 +861,7 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
# 1 credential request
# 1 instance tree
# 6 open sale order / line
# 2 assignments
# 3 assignments
# 3 simulation movements
# 3 sale packing list / line
# 2 sale trade condition
......@@ -885,7 +869,7 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
# 2 software instance
# 1 software product
# 3 subscription request
self.assertRelatedObjectCount(project, 29)
self.assertRelatedObjectCount(project, 30)
self.checkERP5StateBeforeExit()
......@@ -925,9 +909,6 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
'destination_project/%s' % remote_project.getRelativeUrl()
]
)
# first slapos administrator assignment can only be created by
# the erp5 manager
self.addProjectProductionManagerAssignment(remote_owner_person, remote_project)
self.tic()
# hooray, now it is time to create compute_nodes
......@@ -987,9 +968,6 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
'destination_project/%s' % project.getRelativeUrl()
]
)
# first slapos administrator assignment can only be created by
# the erp5 manager
self.addProjectProductionManagerAssignment(remote_public_person, project)
self.tic()
owner_person = remote_public_person
......@@ -1085,7 +1063,7 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
# 1 credential request
# 1 instance tree
# 6 open sale order / line
# 2 assignment
# 3 assignment
# 3 simulation movements
# 3 sale packing list / line
# 2 sale trade condition
......@@ -1093,7 +1071,7 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
# 1 software instance
# 1 software product
# 3 subscription requests
self.assertRelatedObjectCount(remote_project, 29)
self.assertRelatedObjectCount(remote_project, 30)
# Ensure no unexpected object has been created
# 3 allocation supply/line/cell
......@@ -1101,14 +1079,14 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
# 1 credential request
# 1 instance tree
# 4 open sale order / line
# 2 assignment
# 3 assignment
# 2 simulation movements
# 2 sale packing list / line
# 2 sale trade condition
# 1 software instance
# 1 software product
# 2 subscription requests
self.assertRelatedObjectCount(project, 22)
self.assertRelatedObjectCount(project, 23)
self.checkERP5StateBeforeExit()
......@@ -1148,9 +1126,6 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
'destination_project/%s' % remote_project.getRelativeUrl()
]
)
# first slapos administrator assignment can only be created by
# the erp5 manager
self.addProjectProductionManagerAssignment(remote_owner_person, remote_project)
self.tic()
# hooray, now it is time to create compute_nodes
......@@ -1228,9 +1203,6 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
'destination_project/%s' % project.getRelativeUrl()
]
)
# first slapos administrator assignment can only be created by
# the erp5 manager
self.addProjectProductionManagerAssignment(remote_public_person, project)
self.tic()
owner_person = remote_public_person
......@@ -1328,7 +1300,7 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
# 1 credential request
# 2 instance tree
# 9 open sale order / line
# 2 assignment
# 3 assignment
# 4 simulation movements
# 4 sale packing list / line
# 2 sale trade condition
......@@ -1336,7 +1308,7 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
# 2 software instance
# 1 software product
# 4 subscription requests
self.assertRelatedObjectCount(remote_project, 41)
self.assertRelatedObjectCount(remote_project, 42)
# Ensure no unexpected object has been created
# 3 allocation supply/line/cell
......@@ -1344,14 +1316,14 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
# 1 credential request
# 1 instance tree
# 4 open sale order / line
# 2 assignment
# 3 assignment
# 2 simulation movements
# 2 sale packing list / line
# 2 sale trade condition
# 1 software instance
# 1 software product
# 2 subscription requests
self.assertRelatedObjectCount(project, 22)
self.assertRelatedObjectCount(project, 23)
self.checkERP5StateBeforeExit()
......
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