Commit 409414c5 authored by Rafael Monnerat's avatar Rafael Monnerat

py3: No need decode/encode same string

parent a4bbc371
......@@ -969,9 +969,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
def generateSafeXml(self):
return '<?xml version="1.0" encoding="utf-8"?><instance><parameter '\
'id="%s">%s</parameter></instance>' % \
("paramé".decode("UTF-8").encode("UTF-8"),
self.generateNewId().decode("UTF-8").encode("UTF-8"))
'id="paramé">%s</parameter></instance>' % self.generateNewId()
def generateEmptyXml(self):
return '<?xml version="1.0" encoding="utf-8"?><instance></instance>'
......
......@@ -897,9 +897,7 @@ class TestSlapOSCloudInstanceInvalidRequest(SlapOSTestCaseMixin):
def generateUnsafeXml_bad_string(self):
return '<?xml version="1.0" encoding="utf-8"?><instance><parameter '\
'id="%s">%s\x08</parameter></instance>' % \
("paramé".decode("UTF-8").encode("UTF-8"),
self.generateNewId().decode("UTF-8").encode("UTF-8"))
'id="paramé">%s\x08</parameter></instance>' % self.generateNewId()
def _test_invalid(self, title=None, instance_xml=None, sla_xml=None, shared=False):
self._makeComputeNode(self.project)
......
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