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

Method test_rename

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

Source from the content-addressed store, hash-verified

403 assert container.id not in [c.id for c in containers]
404
405 def test_rename(self):
406 client = docker.from_env(version=TEST_API_VERSION)
407 container = client.containers.run("alpine", "echo hello", name="test1",
408 detach=True)
409 self.tmp_containers.append(container.id)
410 assert container.name == "test1"
411 container.rename("test2")
412 container.reload()
413 assert container.name == "test2"
414
415 def test_restart(self):
416 client = docker.from_env(version=TEST_API_VERSION)

Callers

nothing calls this directly

Calls 4

from_envMethod · 0.80
runMethod · 0.80
renameMethod · 0.45
reloadMethod · 0.45

Tested by

no test coverage detected