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

Method test_stop

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

Source from the content-addressed store, hash-verified

992
993class StopTest(BaseAPIIntegrationTest):
994 def test_stop(self):
995 container = self.client.create_container(TEST_IMG, ['sleep', '9999'])
996 id = container['Id']
997 self.client.start(id)
998 self.tmp_containers.append(id)
999 self.client.stop(id, timeout=2)
1000 container_info = self.client.inspect_container(id)
1001 assert 'State' in container_info
1002 state = container_info['State']
1003 assert 'Running' in state
1004 assert state['Running'] is False
1005
1006 def test_stop_with_dict_instead_of_id(self):
1007 container = self.client.create_container(TEST_IMG, ['sleep', '9999'])

Callers

nothing calls this directly

Calls 4

create_containerMethod · 0.80
inspect_containerMethod · 0.80
startMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected