diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/api_image_test.py | 2 | ||||
-rw-r--r-- | tests/integration/api_volume_test.py | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/tests/integration/api_image_test.py b/tests/integration/api_image_test.py index 0f6753f..10e95fe 100644 --- a/tests/integration/api_image_test.py +++ b/tests/integration/api_image_test.py @@ -299,5 +299,5 @@ class PruneImagesTest(BaseAPIIntegrationTest): self.tmp_imgs.append('hello-world') img_id = self.client.inspect_image('hello-world')['Id'] result = self.client.prune_images() - assert img_id in result['ImagesDeleted'] + assert img_id in [img['Deleted'] for img in result['ImagesDeleted']] assert result['SpaceReclaimed'] > 0 diff --git a/tests/integration/api_volume_test.py b/tests/integration/api_volume_test.py index 4bfc672..5a4bb1e 100644 --- a/tests/integration/api_volume_test.py +++ b/tests/integration/api_volume_test.py @@ -56,6 +56,14 @@ class TestVolumes(BaseAPIIntegrationTest): self.client.create_volume(name) self.client.remove_volume(name, force=True) + @requires_api_version('1.25') + def test_prune_volumes(self): + name = 'hopelessmasquerade' + self.client.create_volume(name) + self.tmp_volumes.append(name) + result = self.client.prune_volumes() + assert name in result['VolumesDeleted'] + def test_remove_nonexistent_volume(self): name = 'shootthebullet' with pytest.raises(docker.errors.NotFound): |