Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/models/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def tag(self, repository, tag=None, **kwargs):
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):
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/models_images_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def test_tag_and_remove(self):
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))
Expand Down