Fix more unit tests in py34 job

- fix: 'dict_values' object does not support indexing
- fix: 'ValueError' object has no attribute 'message'
- fix: RuntimeError: dictionary changed size during iteration

Change-Id: I3581783b84a6785c8d5ad07cbd2d5cb190c73d85
This commit is contained in:
Anastasia Kuznetsova 2015-10-01 12:29:49 +03:00
parent ee8c6f363f
commit 77df0f2b6a
3 changed files with 3 additions and 3 deletions

View File

@ -466,7 +466,7 @@ def _schedule_run_workflow(task_ex, task_spec, wf_input, index):
if 'env' in parent_wf_ex.params:
wf_params['env'] = parent_wf_ex.params['env']
for k, v in wf_input.items():
for k, v in list(wf_input.items()):
if k not in wf_spec.get_input():
wf_params[k] = v
del wf_input[k]

View File

@ -78,7 +78,7 @@ class YAQLEvaluator(Evaluator):
try:
YAQL_ENGINE(expression)
except (yaql_exc.YaqlException, KeyError, ValueError, TypeError) as e:
raise exc.YaqlEvaluationException(e.message)
raise exc.YaqlEvaluationException(getattr(e, 'message', e))
@classmethod
def evaluate(cls, expression, data_context):

View File

@ -144,7 +144,7 @@ def prepare_runtime_context(task_ex, task_spec, input_dicts):
def validate_input(with_items_input):
# Take only mapped values and check them.
values = with_items_input.values()
values = list(with_items_input.values())
if not all([isinstance(v, list) for v in values]):
raise exc.InputException(