Tests: Use six.moves.urllib urlencode

Use six.moves instead of try/except imports.

Change-Id: Ib1545d79cc6aab1cb9e30794f0b6044c77d4a1e4
This commit is contained in:
Eric Harney 2017-03-07 15:17:53 -05:00
parent 77a27b95a5
commit 467740f886
4 changed files with 4 additions and 16 deletions

View File

@ -17,10 +17,7 @@ import mock
from oslo_config import cfg
import oslo_messaging as messaging
from oslo_serialization import jsonutils
try:
from urllib import urlencode
except ImportError:
from urllib.parse import urlencode
from six.moves.urllib.parse import urlencode
import webob
from cinder import context

View File

@ -18,10 +18,7 @@ import mock
from oslo_config import cfg
import oslo_messaging as messaging
from oslo_serialization import jsonutils
try:
from urllib import urlencode
except ImportError:
from urllib.parse import urlencode
from six.moves.urllib.parse import urlencode
import webob
from cinder.api.contrib import volume_manage

View File

@ -16,10 +16,7 @@ import ddt
import mock
from oslo_config import cfg
from oslo_serialization import jsonutils
try:
from urllib import urlencode
except ImportError:
from urllib.parse import urlencode
from six.moves.urllib.parse import urlencode
import webob
from cinder.api.v3 import router as router_v3

View File

@ -16,10 +16,7 @@ import ddt
import mock
from oslo_config import cfg
from oslo_serialization import jsonutils
try:
from urllib import urlencode
except ImportError:
from urllib.parse import urlencode
from six.moves.urllib.parse import urlencode
import webob
from cinder.api.v3 import router as router_v3