MCPcopy
hub / github.com/docker/docker-py / test_reload

Method test_reload

tests/integration/models_resources_test.py:8–17  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6class ModelTest(BaseIntegrationTest):
7
8 def test_reload(self):
9 client = docker.from_env(version=TEST_API_VERSION)
10 container = client.containers.run("alpine", "sleep 300", detach=True)
11 self.tmp_containers.append(container.id)
12 first_started_at = container.attrs['State']['StartedAt']
13 container.kill()
14 container.start()
15 assert container.attrs['State']['StartedAt'] == first_started_at
16 container.reload()
17 assert container.attrs['State']['StartedAt'] != first_started_at

Callers

nothing calls this directly

Calls 5

from_envMethod · 0.80
runMethod · 0.80
killMethod · 0.45
startMethod · 0.45
reloadMethod · 0.45

Tested by

no test coverage detected