test: use a better way to make assertion
This commit is contained in:
parent
a4520ff134
commit
7f59cebb85
1 changed files with 11 additions and 1 deletions
|
@ -25,4 +25,14 @@ def test_parse_file():
|
|||
parser = Parser()
|
||||
actual = parser.parse('tests/in/000001.yaml')
|
||||
|
||||
assert actual == expected
|
||||
assert len(actual.services) == len(expected.services)
|
||||
|
||||
for actual_service, expected_service in zip(actual.services, expected.services):
|
||||
assert actual_service.name == expected_service.name
|
||||
assert actual_service.image == expected_service.image
|
||||
assert actual_service.ports == expected_service.ports
|
||||
assert actual_service.networks == expected_service.networks
|
||||
assert actual_service.volumes == expected_service.volumes
|
||||
assert actual_service.depends_on == expected_service.depends_on
|
||||
assert actual_service.links == expected_service.links
|
||||
assert actual_service.extends == expected_service.extends
|
||||
|
|
Loading…
Reference in a new issue