diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-05-17 06:06:51 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-05-17 07:24:29 +0200 |
commit | c883810963b208e60b714e2c222b32f20bd6138a (patch) | |
tree | 18fbcba71c151538950c41715b5db57c41a24a81 /functest/utils/decorators.py | |
parent | b8b2c014b48511486e8cccbcfcaebad843239ac5 (diff) |
Add Python3 support to the ODL testcase
It also adds this support to its dependencies.
Change-Id: I0534f0c7b0e15a9ee89f522f314cf5200874454c
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/utils/decorators.py')
-rw-r--r-- | functest/utils/decorators.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/functest/utils/decorators.py b/functest/utils/decorators.py index bfbdf048..73e0a352 100644 --- a/functest/utils/decorators.py +++ b/functest/utils/decorators.py @@ -5,17 +5,17 @@ import errno import functools import os -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 = urlparse.urlparse(request.url) + parseresult = urllib.parse.urlparse(request.url) if parseresult.scheme == "file": try: dirname = os.path.dirname(parseresult.path) @@ -34,7 +34,7 @@ def can_dump_request_to_file(method): def patch_request(method, url, **kwargs): with requests.sessions.Session() as session: - parseresult = urlparse.urlparse(url) + parseresult = urllib.parse.urlparse(url) if parseresult.scheme == "file": with mock.patch.object(session, 'send', side_effect=dump_preparedrequest): |