diff options
author | steven stark <steven.stark@att.com> | 2019-11-18 16:31:51 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-11-18 16:31:51 +0000 |
commit | 2c04e79bb65a4ffcf4db5d443d6cc3e3ea3f10fe (patch) | |
tree | 3ca3365ab3ff4ad709531a67e0a4d9513c133ed3 /ice_validator | |
parent | 9c7ab065e6477c035ffc6addf384abcef2e9588a (diff) | |
parent | 00c64458942602efe5a3b712540b98ac94fb60f4 (diff) |
Merge "change if bad to assert not bad, message"
Diffstat (limited to 'ice_validator')
-rw-r--r-- | ice_validator/tests/test_vm_type_case.py | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/ice_validator/tests/test_vm_type_case.py b/ice_validator/tests/test_vm_type_case.py index db4646c..6919404 100644 --- a/ice_validator/tests/test_vm_type_case.py +++ b/ice_validator/tests/test_vm_type_case.py @@ -111,14 +111,10 @@ def test_vm_type_case(yaml_file): param = param[0] if isinstance(param, str) and case_mismatch(vm_type, param): bad[(rid, vm_type)].append((prop, param)) - if bad: - raise AssertionError( - "vm-type/parameter case mis-match %s" - % ( - "; ".join( - "resource: %s vm-type: %s %s" - % (k[0], k[1], ", ".join("%s: %s" % i for i in v)) - for k, v in bad.items() - ) - ) - ) + + msg = 'vm-type/parameter case mis-match %s' \ + % '; '.join('resource: %s vm-type: %s %s' % (k[0], k[1], + ', '.join('%s: %s' % i for i in v)) for (k, v) in + bad.items()) + + assert not bad, msg |