diff options
author | Martin Klozik <martinx.klozik@intel.com> | 2016-10-11 07:30:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-10-11 07:30:34 +0000 |
commit | 1dfb1ffbcedf8208c14343fa4b8a7f125ff3a30d (patch) | |
tree | 188b8f17251c5371c505ef93c24b118b7607c48d /conf/__init__.py | |
parent | da5b1633255f904f7d4f4c38c52df2f7f8e74092 (diff) | |
parent | f437566cf8c52619d062dd05447e6d512a138ce9 (diff) |
Merge "integration: Test vHost User numa awareness"
Diffstat (limited to 'conf/__init__.py')
-rw-r--r-- | conf/__init__.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/conf/__init__.py b/conf/__init__.py index 88e8cec6..4d6f57fe 100644 --- a/conf/__init__.py +++ b/conf/__init__.py @@ -170,6 +170,7 @@ class Settings(object): for macro, args, param, _, step in re.findall(_PARSE_PATTERN, value): multi = int(step) if len(step) and int(step) else 1 if macro == '#EVAL': + # pylint: disable=eval-used tmp_result = str(eval(param)) elif macro == '#MAC': mac_value = netaddr.EUI(param).value @@ -204,6 +205,20 @@ class Settings(object): """ return pprint.pformat(self.__dict__) + # + # validation methods used by step driven testcases + # + def validate_getValue(self, result, attr): + """Verifies, that correct value was returned + """ + assert result == self.__dict__[attr] + return True + + def validate_setValue(self, dummy_result, name, value): + """Verifies, that value was correctly set + """ + assert value == self.__dict__[name] + return True settings = Settings() |