Commit 025ef852 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: test: use Person_addVirtualMaster to create project

parent 0e029f0a
...@@ -176,7 +176,6 @@ class SlapOSTestCaseMixin(testSlapOSMixin): ...@@ -176,7 +176,6 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
def addProject(self, organisation=None, currency=None, person=None, is_accountable=False): def addProject(self, organisation=None, currency=None, person=None, is_accountable=False):
assert organisation is None assert organisation is None
assert currency is None assert currency is None
assert not is_accountable
if person is None: if person is None:
project = self.portal.project_module.newContent( project = self.portal.project_module.newContent(
portal_type='Project', portal_type='Project',
...@@ -186,13 +185,19 @@ class SlapOSTestCaseMixin(testSlapOSMixin): ...@@ -186,13 +185,19 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
return project return project
# Action to submit project subscription # Action to submit project subscription
return person.Person_addVirtualMaster(
'project-%s' % self.generateNewId(),
is_accountable,
is_accountable,
batch=1).getRelativeUrl()
"""
service = self.portal.restrictedTraverse('service_module/slapos_virtual_master_subscription') service = self.portal.restrictedTraverse('service_module/slapos_virtual_master_subscription')
subscription_request = service.Resource_createSubscriptionRequest(person, None, None) subscription_request = service.Resource_createSubscriptionRequest(person, None, None)
self.tic() self.tic()
self.logout() self.logout()
return subscription_request.getAggregate() return subscription_request.getAggregate()"""
def _addERP5Login(self, document, **kw): def _addERP5Login(self, document, **kw):
if document.getPortalType() == "Person": if document.getPortalType() == "Person":
......
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