Remove usage of six
Six package is not used anymore Change-Id: Ie72645229f23692d6bf87e58dd8ef212dd91189c
This commit is contained in:
parent
ab12ce32a4
commit
9ddf2f7108
|
@ -12,4 +12,3 @@ oslo.i18n>=3.15.3 # Apache-2.0
|
|||
oslo.utils>=3.33.0 # Apache-2.0
|
||||
python-openstackclient>=5.2.0 # Apache-2.0
|
||||
requests>=2.14.2 # Apache-2.0
|
||||
six>=1.10.0 # MIT
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
import copy
|
||||
|
||||
from oslo_serialization import jsonutils
|
||||
from six.moves.urllib import parse
|
||||
from urllib import parse
|
||||
|
||||
from saharaclient._i18n import _
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from six.moves.urllib import parse
|
||||
from urllib import parse
|
||||
|
||||
from saharaclient.api import base
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from six.moves.urllib import parse as urlparse
|
||||
from urllib import parse as urlparse
|
||||
|
||||
from saharaclient.api import base
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from six.moves.urllib import parse as urlparse
|
||||
from urllib import parse as urlparse
|
||||
|
||||
from saharaclient.api import base
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ class TestCreateJobBinary(TestJobBinaries):
|
|||
|
||||
def test_job_binary_create_internal(self):
|
||||
m_open = mock.mock_open()
|
||||
with mock.patch('six.moves.builtins.open', m_open, create=True):
|
||||
with mock.patch('builtins.open', m_open, create=True):
|
||||
arglist = ['--name', 'job-binary', '--data', 'filepath']
|
||||
verifylist = [('name', 'job-binary'), ('data', 'filepath')]
|
||||
|
||||
|
@ -310,7 +310,7 @@ class TestDownloadJobBinary(TestJobBinaries):
|
|||
|
||||
def test_download_job_binary_default_file(self):
|
||||
m_open = mock.mock_open()
|
||||
with mock.patch('six.moves.builtins.open', m_open, create=True):
|
||||
with mock.patch('builtins.open', m_open, create=True):
|
||||
arglist = ['job-binary']
|
||||
verifylist = [('job_binary', 'job-binary')]
|
||||
|
||||
|
@ -327,7 +327,7 @@ class TestDownloadJobBinary(TestJobBinaries):
|
|||
|
||||
def test_download_job_binary_specified_file(self):
|
||||
m_open = mock.mock_open()
|
||||
with mock.patch('six.moves.builtins.open', m_open, create=True):
|
||||
with mock.patch('builtins.open', m_open, create=True):
|
||||
arglist = ['job-binary', '--file', 'test']
|
||||
verifylist = [('job_binary', 'job-binary'), ('file', 'test')]
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ class TestGetJobTypeConfigs(TestJobTypes):
|
|||
@mock.patch('oslo_serialization.jsonutils.dump')
|
||||
def test_get_job_type_configs_default_file(self, p_dump):
|
||||
m_open = mock.mock_open()
|
||||
with mock.patch('six.moves.builtins.open', m_open, create=True):
|
||||
with mock.patch('builtins.open', m_open, create=True):
|
||||
arglist = ['Pig']
|
||||
verifylist = [('job_type', 'Pig')]
|
||||
|
||||
|
@ -127,7 +127,7 @@ class TestGetJobTypeConfigs(TestJobTypes):
|
|||
@mock.patch('oslo_serialization.jsonutils.dump')
|
||||
def test_get_job_type_configs_specified_file(self, p_dump):
|
||||
m_open = mock.mock_open()
|
||||
with mock.patch('six.moves.builtins.open', m_open):
|
||||
with mock.patch('builtins.open', m_open):
|
||||
arglist = ['Pig', '--file', 'testfile']
|
||||
verifylist = [('job_type', 'Pig'), ('file', 'testfile')]
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ class TestGetPluginConfigs(TestPlugins):
|
|||
@mock.patch('oslo_serialization.jsonutils.dump')
|
||||
def test_get_plugin_configs_default_file(self, p_dump):
|
||||
m_open = mock.mock_open()
|
||||
with mock.patch('six.moves.builtins.open', m_open, create=True):
|
||||
with mock.patch('builtins.open', m_open, create=True):
|
||||
arglist = ['fake', '0.1']
|
||||
verifylist = [('plugin', 'fake'), ('plugin_version', '0.1')]
|
||||
|
||||
|
@ -178,7 +178,7 @@ class TestGetPluginConfigs(TestPlugins):
|
|||
@mock.patch('oslo_serialization.jsonutils.dump')
|
||||
def test_get_plugin_configs_specified_file(self, p_dump):
|
||||
m_open = mock.mock_open()
|
||||
with mock.patch('six.moves.builtins.open', m_open):
|
||||
with mock.patch('builtins.open', m_open):
|
||||
arglist = ['fake', '0.1', '--file', 'testfile']
|
||||
verifylist = [('plugin', 'fake'), ('plugin_version', '0.1'),
|
||||
('file', 'testfile')]
|
||||
|
|
|
@ -293,7 +293,7 @@ class TestDownloadJobBinary(TestJobBinaries):
|
|||
|
||||
def test_download_job_binary_default_file(self):
|
||||
m_open = mock.mock_open()
|
||||
with mock.patch('six.moves.builtins.open', m_open, create=True):
|
||||
with mock.patch('builtins.open', m_open, create=True):
|
||||
arglist = ['job-binary']
|
||||
verifylist = [('job_binary', 'job-binary')]
|
||||
|
||||
|
@ -310,7 +310,7 @@ class TestDownloadJobBinary(TestJobBinaries):
|
|||
|
||||
def test_download_job_binary_specified_file(self):
|
||||
m_open = mock.mock_open()
|
||||
with mock.patch('six.moves.builtins.open', m_open, create=True):
|
||||
with mock.patch('builtins.open', m_open, create=True):
|
||||
arglist = ['job-binary', '--file', 'test']
|
||||
verifylist = [('job_binary', 'job-binary'), ('file', 'test')]
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ class TestGetJobTypeConfigs(TestJobTypes):
|
|||
@mock.patch('oslo_serialization.jsonutils.dump')
|
||||
def test_get_job_type_configs_default_file(self, p_dump):
|
||||
m_open = mock.mock_open()
|
||||
with mock.patch('six.moves.builtins.open', m_open, create=True):
|
||||
with mock.patch('builtins.open', m_open, create=True):
|
||||
arglist = ['Pig']
|
||||
verifylist = [('job_type', 'Pig')]
|
||||
|
||||
|
@ -128,7 +128,7 @@ class TestGetJobTypeConfigs(TestJobTypes):
|
|||
@mock.patch('oslo_serialization.jsonutils.dump')
|
||||
def test_get_job_type_configs_specified_file(self, p_dump):
|
||||
m_open = mock.mock_open()
|
||||
with mock.patch('six.moves.builtins.open', m_open):
|
||||
with mock.patch('builtins.open', m_open):
|
||||
arglist = ['Pig', '--file', 'testfile']
|
||||
verifylist = [('job_type', 'Pig'), ('file', 'testfile')]
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ class TestGetPluginConfigs(TestPlugins):
|
|||
@mock.patch('oslo_serialization.jsonutils.dump')
|
||||
def test_get_plugin_configs_default_file(self, p_dump):
|
||||
m_open = mock.mock_open()
|
||||
with mock.patch('six.moves.builtins.open', m_open, create=True):
|
||||
with mock.patch('builtins.open', m_open, create=True):
|
||||
arglist = ['fake', '0.1']
|
||||
verifylist = [('plugin', 'fake'), ('plugin_version', '0.1')]
|
||||
|
||||
|
@ -178,7 +178,7 @@ class TestGetPluginConfigs(TestPlugins):
|
|||
@mock.patch('oslo_serialization.jsonutils.dump')
|
||||
def test_get_plugin_configs_specified_file(self, p_dump):
|
||||
m_open = mock.mock_open()
|
||||
with mock.patch('six.moves.builtins.open', m_open):
|
||||
with mock.patch('builtins.open', m_open):
|
||||
arglist = ['fake', '0.1', '--file', 'testfile']
|
||||
verifylist = [('plugin', 'fake'), ('plugin_version', '0.1'),
|
||||
('file', 'testfile')]
|
||||
|
|
Loading…
Reference in New Issue