mirror of https://github.com/docker/docker-py.git
Merge pull request #1653 from osallou/master
Closes #1588, image.tag does not return anything
This commit is contained in:
commit
a9d4c7e2b6
|
@ -96,7 +96,7 @@ class Image(Model):
|
||||||
Returns:
|
Returns:
|
||||||
(bool): ``True`` if successful
|
(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):
|
class ImageCollection(Collection):
|
||||||
|
|
|
@ -71,7 +71,8 @@ class ImageTest(BaseIntegrationTest):
|
||||||
client = docker.from_env(version=TEST_API_VERSION)
|
client = docker.from_env(version=TEST_API_VERSION)
|
||||||
image = client.images.pull('alpine:latest')
|
image = client.images.pull('alpine:latest')
|
||||||
|
|
||||||
image.tag(repo, tag)
|
result = image.tag(repo, tag)
|
||||||
|
assert result is True
|
||||||
self.tmp_imgs.append(identifier)
|
self.tmp_imgs.append(identifier)
|
||||||
assert image.id in get_ids(client.images.list(repo))
|
assert image.id in get_ids(client.images.list(repo))
|
||||||
assert image.id in get_ids(client.images.list(identifier))
|
assert image.id in get_ids(client.images.list(identifier))
|
||||||
|
|
Loading…
Reference in New Issue