MCPcopy
hub / github.com/docker/docker-py / test_remove

Method test_remove

tests/integration/api_image_test.py:105–118  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

103
104class RemoveImageTest(BaseAPIIntegrationTest):
105 def test_remove(self):
106 container = self.client.create_container(TEST_IMG, ['touch', '/test'])
107 id = container['Id']
108 self.client.start(id)
109 self.tmp_containers.append(id)
110 res = self.client.commit(id)
111 assert 'Id' in res
112 img_id = res['Id']
113 self.tmp_imgs.append(img_id)
114 logs = self.client.remove_image(img_id, force=True)
115 assert {"Deleted": img_id} in logs
116 images = self.client.images(all=True)
117 res = [x for x in images if x['Id'].startswith(img_id)]
118 assert len(res) == 0
119
120
121class ImportImageTest(BaseAPIIntegrationTest):

Callers

nothing calls this directly

Calls 5

create_containerMethod · 0.80
remove_imageMethod · 0.80
startMethod · 0.45
commitMethod · 0.45
imagesMethod · 0.45

Tested by

no test coverage detected