| 413 | assert container.name == "test2" |
| 414 | |
| 415 | def test_restart(self): |
| 416 | client = docker.from_env(version=TEST_API_VERSION) |
| 417 | container = client.containers.run("alpine", "sleep 100", detach=True) |
| 418 | self.tmp_containers.append(container.id) |
| 419 | first_started_at = container.attrs['State']['StartedAt'] |
| 420 | container.restart() |
| 421 | container.reload() |
| 422 | second_started_at = container.attrs['State']['StartedAt'] |
| 423 | assert first_started_at != second_started_at |
| 424 | |
| 425 | def test_start(self): |
| 426 | client = docker.from_env(version=TEST_API_VERSION) |