MCPcopy Index your code
hub / github.com/docker/docker-py / test_remove

Method test_remove

tests/integration/api_container_test.py:1222–1230  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1220
1221class RemoveContainerTest(BaseAPIIntegrationTest):
1222 def test_remove(self):
1223 container = self.client.create_container(TEST_IMG, ['true'])
1224 id = container['Id']
1225 self.client.start(id)
1226 self.client.wait(id)
1227 self.client.remove_container(id)
1228 containers = self.client.containers(all=True)
1229 res = [x for x in containers if 'Id' in x and x['Id'].startswith(id)]
1230 assert len(res) == 0
1231
1232 def test_remove_with_dict_instead_of_id(self):
1233 container = self.client.create_container(TEST_IMG, ['true'])

Callers

nothing calls this directly

Calls 5

create_containerMethod · 0.80
remove_containerMethod · 0.80
startMethod · 0.45
waitMethod · 0.45
containersMethod · 0.45

Tested by

no test coverage detected