MCPcopy Create free account
hub / github.com/docker/docker-py / test_detach_with_default

Method test_detach_with_default

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

Source from the content-addressed store, hash-verified

193 assert exec_log == b'/var/opt\n'
194
195 def test_detach_with_default(self):
196 container = self.client.create_container(
197 TEST_IMG, 'cat', detach=True, stdin_open=True
198 )
199 id = container['Id']
200 self.client.start(id)
201 self.tmp_containers.append(id)
202
203 exec_id = self.client.exec_create(
204 id, 'cat', stdin=True, tty=True, stdout=True
205 )
206 sock = self.client.exec_start(exec_id, tty=True, socket=True)
207 self.addCleanup(sock.close)
208
209 assert_cat_socket_detached_with_keys(
210 sock, [ctrl_with('p'), ctrl_with('q')]
211 )
212
213 def test_detach_with_config_file(self):
214 self.client._general_configs['detachKeys'] = 'ctrl-p'

Callers

nothing calls this directly

Calls 6

ctrl_withFunction · 0.85
create_containerMethod · 0.80
exec_createMethod · 0.80
exec_startMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected