Skip to content

Commit

Permalink
fix docs and tests
Browse files Browse the repository at this point in the history
Signed-off-by: aiordache <anca.iordache@docker.com>
  • Loading branch information
aiordache committed Sep 15, 2020
1 parent e89a080 commit b67e580
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions docker/models/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,7 @@ def pull(self, repository, tag='latest', **kwargs):
"""
Pull an image of the given name and return it. Similar to the
``docker pull`` command.
If no tag is specified, all tags from that repository will be
pulled.
If tag is None, all tags from that repository will be pulled.
If you want to get the raw pull output, use the
:py:meth:`~docker.api.image.ImageApiMixin.pull` method in the
Expand All @@ -416,7 +415,7 @@ def pull(self, repository, tag='latest', **kwargs):
Returns:
(:py:class:`Image` or list): The image that has been pulled.
If no ``tag`` was specified, the method will return a list
If ``tag`` is None, the method will return a list
of :py:class:`Image` objects belonging to this repository.
Raises:
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/models_containers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def test_run_pull(self):

assert container.id == FAKE_CONTAINER_ID
client.api.pull.assert_called_with(
'alpine', platform=None, tag=None, stream=True
'alpine', platform=None, tag='latest', stream=True
)

def test_run_with_error(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/models_images_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def test_pull(self):

def test_pull_multiple(self):
client = make_fake_client()
images = client.images.pull('test_image')
images = client.images.pull('test_image', tag=None)
client.api.pull.assert_called_with(
'test_image', tag=None, stream=True
)
Expand Down

0 comments on commit b67e580

Please sign in to comment.