(self)
| 501 | client.close() |
| 502 | |
| 503 | def test_stop(self): |
| 504 | client = docker.from_env(version=TEST_API_VERSION) |
| 505 | container = client.containers.run("alpine", "top", detach=True) |
| 506 | self.tmp_containers.append(container.id) |
| 507 | assert container.status in ("running", "created") |
| 508 | container.stop(timeout=2) |
| 509 | container.reload() |
| 510 | assert container.status == "exited" |
| 511 | |
| 512 | def test_top(self): |
| 513 | client = docker.from_env(version=TEST_API_VERSION) |