mirror of https://github.com/docker/docker-py.git
Fix CreateContainerTest.test_invalid_log_driver_raises_exception
This test was updated in 7d92fbdee1
, but
omitted the "error" prefix in the message, causing the test to fail;
_________ CreateContainerTest.test_invalid_log_driver_raises_exception _________
tests/integration/api_container_test.py:293: in test_invalid_log_driver_raises_exception
assert excinfo.value.explanation in expected_msgs
E AssertionError: assert 'error looking up logging plugin asdf: plugin "asdf" not found' in ["logger: no log driver named 'asdf' is registered", 'looking up logging plugin asdf: plugin "asdf" not found']
E + where 'error looking up logging plugin asdf: plugin "asdf" not found' = APIError(HTTPError('400 Client Error: Bad Request for url: http+docker://localhost/v1.39/containers/create')).explanation
E + where APIError(HTTPError('400 Client Error: Bad Request for url: http+docker://localhost/v1.39/containers/create')) = <ExceptionInfo APIError tblen=6>.value
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
c65d437843
commit
26d8045ffa
|
@ -279,7 +279,7 @@ class CreateContainerTest(BaseAPIIntegrationTest):
|
||||||
|
|
||||||
expected_msgs = [
|
expected_msgs = [
|
||||||
"logger: no log driver named 'asdf' is registered",
|
"logger: no log driver named 'asdf' is registered",
|
||||||
"looking up logging plugin asdf: plugin \"asdf\" not found",
|
"error looking up logging plugin asdf: plugin \"asdf\" not found",
|
||||||
]
|
]
|
||||||
with pytest.raises(docker.errors.APIError) as excinfo:
|
with pytest.raises(docker.errors.APIError) as excinfo:
|
||||||
# raises an internal server error 500
|
# raises an internal server error 500
|
||||||
|
|
Loading…
Reference in New Issue