Commit 5c0fb29a authored by Romain Courteaud's avatar Romain Courteaud

slaptool returns unicode text.

parent 4691b7f5
...@@ -79,7 +79,7 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin): ...@@ -79,7 +79,7 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
computer = xml_marshaller.xml_marshaller.loads(requestXml) computer = xml_marshaller.xml_marshaller.loads(requestXml)
computer_id = getattr(computer, '_computer_id', None) computer_id = getattr(computer, '_computer_id', None)
self.assertNotEqual(None, computer_id) self.assertNotEqual(None, computer_id)
return computer_id return computer_id.encode('UTF-8')
def supplySoftware(self, server, url, state='available'): def supplySoftware(self, server, url, state='available'):
self.portal.portal_slap.supplySupply(url, server.getReference(), state) self.portal.portal_slap.supplySupply(url, server.getReference(), state)
...@@ -172,10 +172,12 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin): ...@@ -172,10 +172,12 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
for software_release in slap_computer._software_release_list: for software_release in slap_computer._software_release_list:
if software_release._requested_state == 'destroyed': if software_release._requested_state == 'destroyed':
self.portal.portal_slap.destroyedSoftwareRelease( self.portal.portal_slap.destroyedSoftwareRelease(
software_release._software_release, computer.getReference()) software_release._software_release.encode("UTF-8"),
computer.getReference())
else: else:
self.portal.portal_slap.availableSoftwareRelease( self.portal.portal_slap.availableSoftwareRelease(
software_release._software_release, computer.getReference()) software_release._software_release.encode("UTF-8"),
computer.getReference())
finally: finally:
setSecurityManager(sm) setSecurityManager(sm)
self.tic() self.tic()
...@@ -194,9 +196,9 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin): ...@@ -194,9 +196,9 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
if partition._requested_state == 'destroyed' \ if partition._requested_state == 'destroyed' \
and partition._need_modification == 1: and partition._need_modification == 1:
self.portal.portal_slap.destroyedComputerPartition(computer.getReference(), self.portal.portal_slap.destroyedComputerPartition(computer.getReference(),
partition._partition_id partition._partition_id.encode("UTF-8")
) )
destroyed_partition_id_list.append(partition._partition_id) destroyed_partition_id_list.append(partition._partition_id.encode("UTF-8"))
finally: finally:
setSecurityManager(sm) setSecurityManager(sm)
self.tic() self.tic()
......
169 170
\ 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