Commit 2581c664 authored by Łukasz Nowak's avatar Łukasz Nowak

Use SlapTool to rename.

Otherwise real system is not tested, and so caches are not invalidated
(and not tested)
parent 496b6f2d
...@@ -2921,11 +2921,29 @@ class TestVifibSlapWebServiceMixin(testVifibMixin): ...@@ -2921,11 +2921,29 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
sequence['software_title'] = sequence['requested_reference'] sequence['software_title'] = sequence['requested_reference']
def stepRenameCurrentSoftwareInstanceDead(self, sequence, **kw): def stepRenameCurrentSoftwareInstanceDead(self, sequence, **kw):
"""Renames software instance using external API"""
# Note: In order to keep step list as it is it hackishly access
# needed details required to login through SlapTool
software_instance = self.portal.portal_catalog.getResultValue( software_instance = self.portal.portal_catalog.getResultValue(
uid=sequence['software_instance_uid'] uid=sequence['software_instance_uid']
) )
software_instance.rename(new_name='%sDead' % software_instance.getTitle()) # login into slap
global REMOTE_USER
REMOTE_USER = software_instance.getReference()
self.slap = slap.slap()
self.slap.initializeConnection(self.server_url, timeout=None)
slap_computer_partition = self.slap.registerComputerPartition(
software_instance.getAggregateValue(
portal_type='Computer Partition').getParentValue().getReference(),
software_instance.getAggregateValue(
portal_type='Computer Partition').getReference()
)
slap_computer_partition.rename('%sDead' % software_instance.getTitle())
def stepCheckTreeHasARootSoftwareInstance(self, sequence, **kw): def stepCheckTreeHasARootSoftwareInstance(self, sequence, **kw):
hosting_subscription_uid = sequence['hosting_subscription_uid'] hosting_subscription_uid = sequence['hosting_subscription_uid']
......
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