diff options
| author | Hongbin Lu <hongbin.lu@huawei.com> | 2017-06-20 22:14:03 +0000 |
|---|---|---|
| committer | Hongbin Lu <hongbin.lu@huawei.com> | 2017-06-21 19:20:35 +0000 |
| commit | 7e2486c3d9edc94300a58f5e8203277fd5d7e01d (patch) | |
| tree | 9db545dcf018c49bfb7a1de98c4339326cdfbb95 /kolla/tests | |
| parent | 2627e3c009b580ef7f28eb3814f019f456674b3f (diff) | |
| download | kolla-7e2486c3d9edc94300a58f5e8203277fd5d7e01d.tar.gz kolla-7e2486c3d9edc94300a58f5e8203277fd5d7e01d.zip | |
Upgrade from docker-py to docker
The pypi package 'docker-py' [1] has been renamed to 'docker' [2].
It is better to move to the new 'docker' package because the old
package will be deprecated and all the new features will go into
the new package only.
Package 'docker' has been added to requirements [3]. The old
package 'docker-py' is still allowed to be in the global requirements
during the transition period but it should be removed after all or
most of the projects finsih the migration.
[1] https://pypi.python.org/pypi/docker-py
[2] https://pypi.python.org/pypi/docker
[3] https://review.openstack.org/#/c/423715/
Change-Id: I3ffd8bb6461e8b7edacc5e833754f00c4249b854
Diffstat (limited to 'kolla/tests')
| -rw-r--r-- | kolla/tests/test_build.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/kolla/tests/test_build.py b/kolla/tests/test_build.py index 0c50db98b..c1d17cfdb 100644 --- a/kolla/tests/test_build.py +++ b/kolla/tests/test_build.py @@ -58,7 +58,7 @@ class TasksTest(base.TestCase): self.imageChild.path = self.useFixture(fixtures.TempDir()).path @mock.patch.dict(os.environ, clear=True) - @mock.patch('docker.Client') + @mock.patch('docker.APIClient') def test_push_image(self, mock_client): self.dc = mock_client pusher = build.PushTask(self.conf, self.image) @@ -67,7 +67,7 @@ class TasksTest(base.TestCase): self.image.canonical_name, stream=True, insecure_registry=True) @mock.patch.dict(os.environ, clear=True) - @mock.patch('docker.Client') + @mock.patch('docker.APIClient') def test_build_image(self, mock_client): self.dc = mock_client push_queue = mock.Mock() @@ -82,7 +82,7 @@ class TasksTest(base.TestCase): self.assertTrue(builder.success) @mock.patch.dict(os.environ, clear=True) - @mock.patch('docker.Client') + @mock.patch('docker.APIClient') def test_build_image_with_build_arg(self, mock_client): self.dc = mock_client build_args = { @@ -103,7 +103,7 @@ class TasksTest(base.TestCase): @mock.patch.dict(os.environ, {'http_proxy': 'http://FROM_ENV:8080'}, clear=True) - @mock.patch('docker.Client') + @mock.patch('docker.APIClient') def test_build_arg_from_env(self, mock_client): push_queue = mock.Mock() self.dc = mock_client @@ -122,7 +122,7 @@ class TasksTest(base.TestCase): @mock.patch.dict(os.environ, {'http_proxy': 'http://FROM_ENV:8080'}, clear=True) - @mock.patch('docker.Client') + @mock.patch('docker.APIClient') def test_build_arg_precedence(self, mock_client): self.dc = mock_client build_args = { @@ -141,7 +141,7 @@ class TasksTest(base.TestCase): self.assertTrue(builder.success) - @mock.patch('docker.Client') + @mock.patch('docker.APIClient') @mock.patch('requests.get') def test_requests_get_timeout(self, mock_get, mock_client): self.dc = mock_client @@ -162,7 +162,7 @@ class TasksTest(base.TestCase): self.assertFalse(builder.success) - @mock.patch('docker.Client') + @mock.patch('docker.APIClient') @mock.patch('requests.get') @mock.patch('shutil.rmtree') @mock.patch('shutil.copyfile') @@ -192,7 +192,7 @@ class TasksTest(base.TestCase): else: self.assertIsNotNone(get_result) - @mock.patch('docker.Client') + @mock.patch('docker.APIClient') def test_followups_docker_image(self, mock_client): self.imageChild.source = { 'source': 'http://fake/source', |
