Commit d20479f3 authored by Emmy Vouriot's avatar Emmy Vouriot Committed by Jérome Perrin

remove encode in py3

parent b975e20d
......@@ -604,7 +604,7 @@ return json.dumps({
raise ValueError("Unexcpected Answer %s" % response)
self.assertEqual(self.portal.REQUEST.RESPONSE.getStatus(), 201)
self.portal.REQUEST.RESPONSE.setStatus(200)
person = self.portal.restrictedTraverse(response['id'].encode())
person = self.portal.restrictedTraverse(response['id'].encode() if six.PY2 else response["id"])
self.assertEqual(person.getTitle(), self.id_template)
def createUpdateScriptjIOWebSectionCreateOrganisationFromJSON(self):
......@@ -651,7 +651,7 @@ return json.dumps({
raise ValueError("Unexcpected Answer %s" % response)
self.assertEqual(self.portal.REQUEST.RESPONSE.getStatus(), 201)
self.portal.REQUEST.RESPONSE.setStatus(200)
organisation = self.portal.restrictedTraverse(response['id'].encode())
organisation = self.portal.restrictedTraverse(response['id'].encode() if six.PY2 else response["id"])
self.assertEqual(organisation.getTitle(), self.id_template)
# Check Second action
response = json.loads(self.postToApi(
......@@ -664,7 +664,7 @@ return json.dumps({
raise ValueError("Unexcpected Answer %s" % response)
self.assertEqual(self.portal.REQUEST.RESPONSE.getStatus(), 201)
self.portal.REQUEST.RESPONSE.setStatus(200)
person = self.portal.restrictedTraverse(response['id'].encode())
person = self.portal.restrictedTraverse(response['id'].encode() if six.PY2 else response["id"])
self.assertEqual(person.getTitle(), self.id_template)
def test_action_post_no_action_matches(self):
......
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