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

Method test_execute_command

tests/integration/api_exec_test.py:51–62  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

49 assert item in output
50
51 def test_execute_command(self):
52 container = self.client.create_container(TEST_IMG, 'cat',
53 detach=True, stdin_open=True)
54 id = container['Id']
55 self.client.start(id)
56 self.tmp_containers.append(id)
57
58 res = self.client.exec_create(id, ['echo', 'hello'])
59 assert 'Id' in res
60
61 exec_log = self.client.exec_start(res)
62 assert exec_log == b'hello\n'
63
64 def test_exec_command_string(self):
65 container = self.client.create_container(TEST_IMG, 'cat',

Callers

nothing calls this directly

Calls 4

create_containerMethod · 0.80
exec_createMethod · 0.80
exec_startMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected