aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting/utils
diff options
context:
space:
mode:
authorVincent Danno <vincent.danno@orange.com>2021-05-26 13:08:55 +0200
committerVincent Danno <vincent.danno@orange.com>2021-06-01 20:40:32 +0200
commita656fd764b0a608caaf198bfa9685a09a7eaca16 (patch)
tree501fa47e06658b8a43e2ccca4837c530a49dfc72 /xtesting/utils
parent6192b2cf9ffd46bdb8189ce3236cf4d9b722b69c (diff)
Drop six
python 2 was dropped [1] so we don't need six anymore [1]: https://gerrit.opnfv.org/gerrit/c/functest-xtesting/+/68262 Signed-off-by: Vincent Danno <vincent.danno@orange.com> Change-Id: I840211990b76f77a46e9e737fc4a4c857b57c0b2
Diffstat (limited to 'xtesting/utils')
-rw-r--r--xtesting/utils/decorators.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/xtesting/utils/decorators.py b/xtesting/utils/decorators.py
index 230a99e7..2ce12fa7 100644
--- a/xtesting/utils/decorators.py
+++ b/xtesting/utils/decorators.py
@@ -12,17 +12,17 @@
import errno
import functools
import os
+from urllib.parse import urlparse
import mock
import requests.sessions
-from six.moves import urllib
def can_dump_request_to_file(method):
def dump_preparedrequest(request, **kwargs):
# pylint: disable=unused-argument
- parseresult = urllib.parse.urlparse(request.url)
+ parseresult = urlparse(request.url)
if parseresult.scheme == "file":
try:
dirname = os.path.dirname(parseresult.path)
@@ -41,7 +41,7 @@ def can_dump_request_to_file(method):
def patch_request(method, url, **kwargs):
with requests.sessions.Session() as session:
- parseresult = urllib.parse.urlparse(url)
+ parseresult = urlparse(url)
if parseresult.scheme == "file":
with mock.patch.object(session, 'send',
side_effect=dump_preparedrequest):