diff options
author | Olivier Sallou <olivier.sallou@irisa.fr> | 2017-06-16 17:49:43 +0200 |
---|---|---|
committer | Olivier Sallou <olivier.sallou@irisa.fr> | 2017-06-16 17:49:43 +0200 |
commit | d638829f736aa7a942a780ff7796facb2713a959 (patch) | |
tree | 5f838982c0625958016ff86db3a92c4d6b342bd4 | |
parent | 8fc6540fea8d4ed86f187a064872b6d616208e8b (diff) | |
download | docker-py-d638829f736aa7a942a780ff7796facb2713a959.tar.gz |
Closes #1588, image.tag does not return anything
This patch returns the check made against api when tagging an image as stated in documentation
Signed-off-by: Olivier Sallou <olivier.sallou@irisa.fr>
-rw-r--r-- | docker/models/images.py | 2 | ||||
-rw-r--r-- | tests/integration/models_images_test.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/docker/models/images.py b/docker/models/images.py index a9ed65e..e8af101 100644 --- a/docker/models/images.py +++ b/docker/models/images.py @@ -96,7 +96,7 @@ class Image(Model): Returns: (bool): ``True`` if successful """ - self.client.api.tag(self.id, repository, tag=tag, **kwargs) + return self.client.api.tag(self.id, repository, tag=tag, **kwargs) class ImageCollection(Collection): diff --git a/tests/integration/models_images_test.py b/tests/integration/models_images_test.py index 6d61e49..881df0a 100644 --- a/tests/integration/models_images_test.py +++ b/tests/integration/models_images_test.py @@ -71,7 +71,8 @@ class ImageTest(BaseIntegrationTest): client = docker.from_env(version=TEST_API_VERSION) image = client.images.pull('alpine:latest') - image.tag(repo, tag) + result = image.tag(repo, tag) + assert result is True self.tmp_imgs.append(identifier) assert image.id in get_ids(client.images.list(repo)) assert image.id in get_ids(client.images.list(identifier)) |