diff options
author | Joffrey F <joffrey@docker.com> | 2017-12-14 15:12:08 -0800 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2017-12-14 16:53:44 -0800 |
commit | 6b8dfe42499345aaa1701d835ea0a9b86a00f1a6 (patch) | |
tree | a93eb2ddda39d3f60cd382927baedadce96ece16 /tests/unit/models_containers_test.py | |
parent | 8cfd4cb39f5d50ee0080e5c038809425784fd516 (diff) | |
download | docker-py-1813-run-autoremove.tar.gz |
Retrieve container logs before container exits / is removed1813-run-autoremove
Signed-off-by: Joffrey F <joffrey@docker.com>
Diffstat (limited to 'tests/unit/models_containers_test.py')
-rw-r--r-- | tests/unit/models_containers_test.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/unit/models_containers_test.py b/tests/unit/models_containers_test.py index 5eaa45a..a479e83 100644 --- a/tests/unit/models_containers_test.py +++ b/tests/unit/models_containers_test.py @@ -12,7 +12,7 @@ class ContainerCollectionTest(unittest.TestCase): client = make_fake_client() out = client.containers.run("alpine", "echo hello world") - assert out == 'hello world\n' + assert out == b'hello world\n' client.api.create_container.assert_called_with( image="alpine", @@ -24,9 +24,8 @@ class ContainerCollectionTest(unittest.TestCase): client.api.start.assert_called_with(FAKE_CONTAINER_ID) client.api.wait.assert_called_with(FAKE_CONTAINER_ID) client.api.logs.assert_called_with( - FAKE_CONTAINER_ID, - stderr=False, - stdout=True + FAKE_CONTAINER_ID, stderr=False, stdout=True, stream=True, + follow=True ) def test_create_container_args(self): |