Commit 85ed30a3 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud:

* test: use Person_addVirtualMaster to create project
* test: login as user to request the instance
parent f3b2a3fc
......@@ -383,6 +383,7 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
self.stepCallSlaposAllocateInstanceAlarm()
self.tic()
self.login(person_user_id)
self.personRequestInstance(
software_release=software_release,
software_type=software_type,
......
......@@ -176,7 +176,6 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
def addProject(self, organisation=None, currency=None, person=None, is_accountable=False):
assert organisation is None
assert currency is None
assert not is_accountable
if person is None:
project = self.portal.project_module.newContent(
portal_type='Project',
......@@ -186,13 +185,19 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
return project
# 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')
subscription_request = service.Resource_createSubscriptionRequest(person, None, None)
self.tic()
self.logout()
return subscription_request.getAggregate()
return subscription_request.getAggregate()"""
def _addERP5Login(self, document, **kw):
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