aboutsummaryrefslogtreecommitdiffstats
path: root/ice_validator/tests/test_base_template_names.py
diff options
context:
space:
mode:
authorstark, steven <ss820f@att.com>2018-07-19 14:23:39 -0700
committerstark, steven <ss820f@att.com>2018-07-19 15:27:56 -0700
commite99347bb14318a57307e2809c3d9577fc29bcb68 (patch)
tree39e7752de2f9e15a6ed590b6d66594be62549637 /ice_validator/tests/test_base_template_names.py
parentc42086a36bbfaf9286e1c08330f25d1b06a35f4b (diff)
[VNFRQTS] update decorator for validation script
update decorator for validation script corresponding to 5.2.1 of VNFRTQS update decorator for validation script corresponding to 5.2.2 of VNFRTQS Change-Id: I063e799a27c76bb58c031273aca48031965849d9 Issue-ID: VVP-88 Signed-off-by: stark, steven <ss820f@att.com>
Diffstat (limited to 'ice_validator/tests/test_base_template_names.py')
-rw-r--r--ice_validator/tests/test_base_template_names.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/ice_validator/tests/test_base_template_names.py b/ice_validator/tests/test_base_template_names.py
index 27be5fc..cc7ab0b 100644
--- a/ice_validator/tests/test_base_template_names.py
+++ b/ice_validator/tests/test_base_template_names.py
@@ -40,9 +40,13 @@
from os import listdir
from os import path
+import re
from .helpers import check_basename_ending
from .helpers import validates
+# is 'base', starts with 'base_', contains '_base_', ends with '_base'
+RE_BASE = re.compile(r'(^base$)|(^base_)|(_base_)|(_base$)')
+
@validates('R-37028', 'R-87485', 'R-81339', 'R-87247', 'R-76057')
def test_base_template_names(template_dir):
@@ -60,9 +64,6 @@ def test_base_template_names(template_dir):
if check_basename_ending('volume', filename):
continue
- if (filename.endswith("_base") or
- filename.startswith("base_") or
- filename == "base" or
- filename.find("_base_") > 0):
+ if RE_BASE.search(filename):
base_template_count += 1
assert base_template_count == 1