Commit e660251a authored by Jérome Perrin's avatar Jérome Perrin

py3: use six.moves.urllib

parent 1bcc7f6a
......@@ -27,7 +27,7 @@
import string
import random
import urllib
import six.moves.urllib as urllib
import msgpack
from six.moves.http_client import NO_CONTENT
......@@ -66,7 +66,7 @@ class TestDataIngestion(ERP5TypeTestCase):
body = msgpack.packb([0, data_chunk], use_bin_type=True)
env = { "CONTENT_TYPE": "application/x-www-form-urlencoded" }
body = str2bytes(urllib.urlencode({ "data_chunk": body }))
body = str2bytes(urllib.parse.urlencode({ "data_chunk": body }))
if not isinstance(ingestion_policy, str):
ingestion_policy = ingestion_policy.getPath()
......
......@@ -30,7 +30,7 @@ import string
import random
import struct
import textwrap
import urllib
import six.moves.urllib as urllib
import uuid
from zExceptions import BadRequest
......@@ -100,7 +100,7 @@ class Test(ERP5TypeTestCase):
body = msgpack.packb([0, real_data], use_bin_type=True)
if old_fluentd:
env = {'CONTENT_TYPE': 'application/x-www-form-urlencoded'}
body = urllib.urlencode({'data_chunk': body})
body = urllib.parse.urlencode({'data_chunk': body})
else:
env = {'CONTENT_TYPE': 'application/octet-stream'}
path = ingestion_policy.getPath() + '/ingest?reference=' + reference
......
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