Commit a8eae036 authored by Łukasz Nowak's avatar Łukasz Nowak

Simplify setup.

parent 94071a40
...@@ -51,18 +51,14 @@ class VifibSlaposRestAPIV1Mixin(TestVifibSlapWebServiceMixin): ...@@ -51,18 +51,14 @@ class VifibSlaposRestAPIV1Mixin(TestVifibSlapWebServiceMixin):
assignment.open() assignment.open()
customer.requestSoftwareInstance = Simulator(self.person_request_simulator) customer.requestSoftwareInstance = Simulator(self.person_request_simulator)
customer.manage_setLocalRoles(customer.getReference(),
transaction.commit() ['Associate'])
customer.recursiveImmediateReindexObject()
transaction.commit()
customer.updateLocalRolesOnSecurityGroups()
transaction.commit() transaction.commit()
customer.recursiveImmediateReindexObject() customer.recursiveImmediateReindexObject()
return customer, customer_reference return customer, customer_reference
def afterSetUp(self): def afterSetUp(self):
self.setupVifibMachineAuthenticationPlugin() self.setupVifibMachineAuthenticationPlugin()
self.setupVifibShadowAuthenticationPlugin()
self.test_random_id = self.generateNewId() self.test_random_id = self.generateNewId()
self.access_control_allow_headers = 'some, funny, headers, ' \ self.access_control_allow_headers = 'some, funny, headers, ' \
'always, expected, %s' % self.test_random_id 'always, expected, %s' % self.test_random_id
...@@ -428,14 +424,12 @@ class VifibSlaposRestAPIV1InstanceMixin(VifibSlaposRestAPIV1Mixin): ...@@ -428,14 +424,12 @@ class VifibSlaposRestAPIV1InstanceMixin(VifibSlaposRestAPIV1Mixin):
destination_section=person.getRelativeUrl() destination_section=person.getRelativeUrl()
) )
hosting_subscription.validate() hosting_subscription.validate()
transaction.commit() hosting_subscription.manage_setLocalRoles(person.getReference(),
hosting_subscription.updateLocalRolesOnSecurityGroups() ['Assignee'])
transaction.commit()
hosting_subscription.recursiveImmediateReindexObject()
transaction.commit()
software_instance.manage_setLocalRoles(person.getReference(), software_instance.manage_setLocalRoles(person.getReference(),
['Assignee']) ['Assignee'])
transaction.commit() transaction.commit()
hosting_subscription.recursiveImmediateReindexObject()
software_instance.recursiveImmediateReindexObject() software_instance.recursiveImmediateReindexObject()
return software_instance return software_instance
......
30 31
\ No newline at end of file \ No newline at end of file
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