diff options
author | zhihui wu <wu.zhihui1@zte.com.cn> | 2017-01-25 01:41:31 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-01-25 01:41:31 +0000 |
commit | f5c23e82e2f59af3ed59a8ad46c119f141cefe7b (patch) | |
tree | 4ce4dc99d3ac91cf905a1524e7f12ddb5f557c01 /tests/unit/loader/qpi_test.py | |
parent | 3a08c5442a70dec7f628b7e9b11a9a9384767918 (diff) | |
parent | b659a9296223b7f63a89bedbc0dad281117de936 (diff) |
Merge "Formalize constants for property names"
Diffstat (limited to 'tests/unit/loader/qpi_test.py')
-rw-r--r-- | tests/unit/loader/qpi_test.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/unit/loader/qpi_test.py b/tests/unit/loader/qpi_test.py index 4b3fd4d0..3328b43a 100644 --- a/tests/unit/loader/qpi_test.py +++ b/tests/unit/loader/qpi_test.py @@ -9,7 +9,7 @@ import pytest -from qtip.base.constant import FormulaName, PropName +from qtip.base.constant import FormulaName, SpecProp from qtip.loader.qpi import QPISpec QPI_SPEC = 'compute.yaml' @@ -33,20 +33,20 @@ def test_list_all(benchmarks_root): qpi_spec_list = QPISpec.list_all(paths=[benchmarks_root]) assert len(list(qpi_spec_list)) is 2 for item in qpi_spec_list: - assert PropName.NAME in item - assert PropName.CONTENT in item - assert PropName.ABSPATH in item - assert PropName.ABSPATH is not None + assert SpecProp.NAME in item + assert SpecProp.CONTENT in item + assert SpecProp.ABSPATH in item + assert SpecProp.ABSPATH is not None def test_content(qpi_spec): content = qpi_spec.content - assert PropName.DESCRIPTION in content - assert PropName.FORMULA in content - assert PropName.SECTIONS in content + assert SpecProp.DESCRIPTION in content + assert SpecProp.FORMULA in content + assert SpecProp.SECTIONS in content - assert content[PropName.FORMULA] in FormulaName.__dict__.values() - sections = content[PropName.SECTIONS] + assert content[SpecProp.FORMULA] in FormulaName.__dict__.values() + sections = content[SpecProp.SECTIONS] assert isinstance(sections, list) for section in sections: - assert PropName.NAME in section + assert SpecProp.NAME in section |