Commit c3d79b06 authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: test: set subscription_assignment_category_list on the system preference

parent 3492b71f
......@@ -52,8 +52,14 @@ class TestSlapOSVirtualMasterScenario(DefaultScenarioMixin):
# create a default project
project = self.addProject()
self.web_site = self.portal.web_site_module.slapos_master_panel
self.web_site.edit(
configuration_default_project_relative_url=project.getRelativeUrl()
preference = self.portal.portal_preferences.slapos_default_system_preference
preference.edit(
preferred_subscription_assignment_category_list=[
'function/customer',
'role/client',
'destination_project/%s' % project.getRelativeUrl()
]
)
# some preparation
......@@ -101,7 +107,6 @@ class TestSlapOSVirtualMasterScenario(DefaultScenarioMixin):
public_person = self.portal.portal_catalog.getResultValue(
portal_type="ERP5 Login",
reference=public_reference).getParentValue()
self.addProjectCustomerAssignment(public_person, project)
public_instance_title = 'Public title %s' % self.generateNewId()
public_instance_type = 'public type'
......@@ -141,11 +146,11 @@ class TestSlapOSVirtualMasterScenario(DefaultScenarioMixin):
self.login()
# Ensure no unexpected object has been created
# 2 assignment, 1 instance tree, 1 compute node, 1 software installation
# 3 (can reduce to 2) assignment, 1 instance tree, 1 compute node, 1 software installation
# 1 software instance
# 2 credential request
related_object_list = project.Base_getRelatedObjectList()
assert len(related_object_list) == 8, [x.getRelativeUrl() for x in related_object_list]
assert len(related_object_list) == 9, [x.getRelativeUrl() for x in related_object_list]
self.stepcheckERP5Consistency()
......
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