mirror of https://github.com/docker/docker-py.git
integration: adjust tests for omitted "OnBuild"
The Docker API may either return an empty "OnBuild" or omit the field altogether if it's not set. Adjust the tests to make either satisfy the test. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
db7f8b8bb6
commit
e5c3eb18b6
|
@ -275,7 +275,7 @@ class BuildTest(BaseAPIIntegrationTest):
|
|||
pass
|
||||
|
||||
info = self.client.inspect_image('build1')
|
||||
assert not info['Config']['OnBuild']
|
||||
assert 'OnBuild' not in info['Config'] or not info['Config']['OnBuild']
|
||||
|
||||
@requires_api_version('1.25')
|
||||
def test_build_with_network_mode(self):
|
||||
|
|
|
@ -266,7 +266,7 @@ class BuildTest(BaseAPIIntegrationTest):
|
|||
pass
|
||||
|
||||
info = self.client.inspect_image('build1')
|
||||
assert not info['Config']['OnBuild']
|
||||
assert 'OnBuild' not in info['Config'] or not info['Config']['OnBuild']
|
||||
|
||||
@requires_api_version('1.25')
|
||||
def test_build_with_network_mode(self):
|
||||
|
|
Loading…
Reference in New Issue