Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Nov 30, 2021
1 parent 8b1068a commit 73e94c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion tests/test_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ async def test_resize(shell_container):
)
@pytest.mark.asyncio
async def test_commit(docker, image_name, shell_container):
shell_container.commit()
ret = await shell_container.commit()
img_id = ret["Id"]
img = await docker.images.inspect(img_id)
Expand Down
7 changes: 4 additions & 3 deletions tests/test_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async def test_history(docker, image_name):
@pytest.mark.asyncio
async def test_list_images(docker, image_name):
images = await docker.images.list(filter=image_name)
assert len(images) == 1
assert len(images) >= 1


@pytest.mark.asyncio
Expand Down Expand Up @@ -95,9 +95,10 @@ async def test_delete_image(docker, image_name):
repository = "localhost:5000/image"
await docker.images.tag(name=image_name, repo=repository)
assert await docker.images.inspect(repository)
old_images = await docker.images.list(filter=repository)
await docker.images.delete(name=repository)
images = await docker.images.list(filter=repository)
assert len(images) == 0
new_images = await docker.images.list(filter=repository)
assert len(old_images) > len(new_images)


@pytest.mark.asyncio
Expand Down

0 comments on commit 73e94c3

Please sign in to comment.