diff options
| author | Michal Nasiadka <michal.nasiadka@nokia.com> | 2018-05-16 10:24:56 +0200 |
|---|---|---|
| committer | Michal Nasiadka <michal.nasiadka@nokia.com> | 2018-05-16 15:17:46 +0200 |
| commit | 4c91f67662171989f1297113db9cc131a3e05dc6 (patch) | |
| tree | 3a00a3caebe09e21e4c3450a0db8994070e4ed11 /kolla/tests | |
| parent | 42117a49e3b8730c106533e1c30f0fa248e01e93 (diff) | |
| download | kolla-4c91f67662171989f1297113db9cc131a3e05dc6.tar.gz kolla-4c91f67662171989f1297113db9cc131a3e05dc6.zip | |
Fix image push for python3
Rework push_image function to use docker client push function with decode=True, to decode automatically to dict.
Change-Id: I28d38e968c3809a1074347271e49dc07dc861f11
Closes-Bug: 1771514
Diffstat (limited to 'kolla/tests')
| -rw-r--r-- | kolla/tests/test_build.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kolla/tests/test_build.py b/kolla/tests/test_build.py index 9c3dc8abd..d5c7e77dc 100644 --- a/kolla/tests/test_build.py +++ b/kolla/tests/test_build.py @@ -65,7 +65,8 @@ class TasksTest(base.TestCase): pusher = build.PushTask(self.conf, self.image) pusher.run() mock_client().push.assert_called_once_with( - self.image.canonical_name, stream=True, insecure_registry=True) + self.image.canonical_name, decode=True, + stream=True, insecure_registry=True) @mock.patch('docker.version', '3.0.0') @mock.patch.dict(os.environ, clear=True) @@ -75,7 +76,7 @@ class TasksTest(base.TestCase): pusher = build.PushTask(self.conf, self.image) pusher.run() mock_client().push.assert_called_once_with( - self.image.canonical_name, stream=True) + self.image.canonical_name, decode=True, stream=True) @mock.patch.dict(os.environ, clear=True) @mock.patch('docker.APIClient') |
