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

Method test_exec_command_string

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

Source from the content-addressed store, hash-verified

62 assert exec_log == b'hello\n'
63
64 def test_exec_command_string(self):
65 container = self.client.create_container(TEST_IMG, 'cat',
66 detach=True, stdin_open=True)
67 id = container['Id']
68 self.client.start(id)
69 self.tmp_containers.append(id)
70
71 res = self.client.exec_create(id, 'echo hello world')
72 assert 'Id' in res
73
74 exec_log = self.client.exec_start(res)
75 assert exec_log == b'hello world\n'
76
77 def test_exec_command_as_user(self):
78 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