diff options
author | 2018-12-17 12:43:02 -0800 | |
---|---|---|
committer | 2018-12-17 13:04:00 -0800 | |
commit | 1f4df7c7ad27b23773ad9cdbe4db1632ce388cf1 (patch) | |
tree | 8092104f8be23051ff81c9f71ee34116df4d33ba /ice_validator/tests/test_vm_type_resource_id.py | |
parent | ca9085f0f77d442d3741a8c754e65cc45b6a318d (diff) |
[VVP] updating validation scripts in dublin
- adding backlog of new validation scripts for dublin
- updating existing tests
- removing outdated tests
Issue-ID: VVP-123
Change-Id: Ib8260889ac957c1dd28d8ede450fc8edc6fb0ec0
Signed-off-by: stark, steven <steven.stark@att.com>
Diffstat (limited to 'ice_validator/tests/test_vm_type_resource_id.py')
-rw-r--r-- | ice_validator/tests/test_vm_type_resource_id.py | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/ice_validator/tests/test_vm_type_resource_id.py b/ice_validator/tests/test_vm_type_resource_id.py index beb6745..2a0150c 100644 --- a/ice_validator/tests/test_vm_type_resource_id.py +++ b/ice_validator/tests/test_vm_type_resource_id.py @@ -38,8 +38,8 @@ # ECOMP is a trademark and service mark of AT&T Intellectual Property. # -'''vm-type resource_id -''' +"""vm-type resource_id +""" import pytest @@ -47,29 +47,28 @@ from .structures import Heat from .helpers import validates from .utils import vm_types as utils_vm_types -VERSION = '1.1.0' +VERSION = "1.1.0" -@validates('R-46839') +@validates("R-46839") def test_vm_type_resource_id(heat_template): - ''' + """ A VNF's Heat Orchestration Template's use of ``{vm-type}`` in all Resource IDs **MUST** be the same case. - ''' + """ bad = {} h = Heat(filepath=heat_template) if not h.resources: pytest.skip("No resources specified in the heat template") - vm_types = {v + '_': v.lower() + '_' - for v in utils_vm_types.get_vm_types(h.resources)} + vm_types = { + v + "_": v.lower() + "_" for v in utils_vm_types.get_vm_types(h.resources) + } if not vm_types: pytest.skip("No {vm-type} specified in the heat template") for rid in h.resources: lower_rid = rid.lower() for vm_type, lower_vm_type in vm_types.items(): - if (lower_rid.startswith(lower_vm_type) - and not rid.startswith(vm_type)): - bad[rid] = vm_type - assert not bad, 'resource_id which do not match their vm-type %s' % bad - + if lower_rid.startswith(lower_vm_type) and not rid.startswith(vm_type): + bad[rid] = vm_type + assert not bad, "resource_id which do not match their vm-type %s" % bad |