diff options
author | Joffrey F <joffrey@docker.com> | 2017-01-30 17:59:03 -0800 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2017-01-30 17:59:03 -0800 |
commit | 9c61ed908c1276688c64eab42ad641b972b4d6d0 (patch) | |
tree | 34340a9a113ca0005da980d72d320078a0e456bb /tests/integration/api_volume_test.py | |
parent | 8bdbcebc3232ea2abd3b2d628b779103ffecb889 (diff) | |
download | docker-py-prunes.tar.gz |
Add prune_volumes methodprunes
Signed-off-by: Joffrey F <joffrey@docker.com>
Diffstat (limited to 'tests/integration/api_volume_test.py')
-rw-r--r-- | tests/integration/api_volume_test.py | 8 |
1 files changed, 8 insertions, 0 deletions
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): |