Commit 8d1c638a authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_cloud: SlapOSTestCaseDefaultScenarioMixin Make code compatible with LiveTest also

parent 0c48f4c7
......@@ -198,6 +198,8 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
self.login(computer_user_id)
computer_xml = self.portal.portal_slap.getFullComputerInformation(
computer_id=computer.getReference())
if not isinstance(computer_xml, str):
computer_xml = computer_xml.getBody()
slap_computer = xml_marshaller.xml_marshaller.loads(computer_xml)
self.assertEqual('Computer', slap_computer.__class__.__name__)
for software_release in slap_computer._software_release_list:
......@@ -220,6 +222,8 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
self.login(computer_user_id)
computer_xml = self.portal.portal_slap.getFullComputerInformation(
computer_id=computer.getReference())
if not isinstance(computer_xml, str):
computer_xml = computer_xml.getBody()
slap_computer = xml_marshaller.xml_marshaller.loads(computer_xml)
self.assertEqual('Computer', slap_computer.__class__.__name__)
destroyed_partition_id_list = []
......@@ -249,7 +253,9 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
try:
self.login(computer_user_id)
computer_xml = self.portal.portal_slap.getFullComputerInformation(
computer_id=computer.getReference())
computer_id=computer.getReference())
if not isinstance(computer_xml, str):
computer_xml = computer_xml.getBody()
slap_computer = xml_marshaller.xml_marshaller.loads(computer_xml)
self.assertEqual('Computer', slap_computer.__class__.__name__)
for partition in slap_computer._computer_partition_list:
......
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