(self)
| 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) |