Merge pull request #1653 from osallou/master

Closes #1588, image.tag does not return anything
This commit is contained in:
Joffrey F 2017-06-16 11:32:25 -07:00 committed by GitHub
commit a9d4c7e2b6
2 changed files with 3 additions and 2 deletions

View File

@ -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):

View File

@ -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))