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

Method test_wait

tests/integration/models_containers_test.py:530–539  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

528 assert container.attrs['HostConfig']['CpuShares'] == 3
529
530 def test_wait(self):
531 client = docker.from_env(version=TEST_API_VERSION)
532 container = client.containers.run("alpine", "sh -c 'exit 0'",
533 detach=True)
534 self.tmp_containers.append(container.id)
535 assert container.wait()['StatusCode'] == 0
536 container = client.containers.run("alpine", "sh -c 'exit 1'",
537 detach=True)
538 self.tmp_containers.append(container.id)
539 assert container.wait()['StatusCode'] == 1
540
541 def test_create_with_volume_driver(self):
542 client = docker.from_env(version=TEST_API_VERSION)

Callers

nothing calls this directly

Calls 3

from_envMethod · 0.80
runMethod · 0.80
waitMethod · 0.45

Tested by

no test coverage detected