summaryrefslogtreecommitdiffstats
path: root/vnftest/core
diff options
context:
space:
mode:
authorMoshe <moshehoa@amdocs.com>2019-02-06 10:31:16 +0200
committerMoshe <moshehoa@amdocs.com>2019-02-06 11:09:01 +0200
commit7e107fbf7941e7543948e9a222767a9b8d02b1f7 (patch)
treea4ce5f342b66efd912b6e15a680116508f80effe /vnftest/core
parent50102ad9b8545ec7b3258025b0f6c0ef6cd0d223 (diff)
refactor rest client to allow multipart formdata
Issue-ID: VNFSDK-350 Change-Id: I0581d562d53985450716c829dda6ca6e070283f1 Signed-off-by: Moshe <moshehoa@amdocs.com> refactor rest client to allow multipart formdata Issue-ID: VNFSDK-350 Change-Id: I2c60d1b28f010300f19f9bc02a94596060a58e05 Signed-off-by: Moshe <moshehoa@amdocs.com>
Diffstat (limited to 'vnftest/core')
-rw-r--r--vnftest/core/task.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/vnftest/core/task.py b/vnftest/core/task.py
index d464d12..f1d2a4e 100644
--- a/vnftest/core/task.py
+++ b/vnftest/core/task.py
@@ -99,11 +99,11 @@ class Task(object): # pragma: no cover
if self.args.suite:
# 1.parse suite, return suite_params info
- task_files, task_args_list, task_args_fnames = \
- parser.parse_suite()
+ task_files, task_args_list, task_args_fnames = parser.parse_suite()
+
else:
task_files = [parser.path]
- task_args_list = [self.args.task_args]
+ task_args_list = [{}]
task_args_fnames = [self.args.task_args_file]
LOG.debug("task_files:%s, task_args_list:%s, task_args_fnames:%s",
@@ -120,9 +120,11 @@ class Task(object): # pragma: no cover
task_args_file = task_args_fnames[i]
task_args = task_args_list[i]
try:
+ inputs.update(parse_task_args("global_task_args", self.args.task_args))
if task_args_file:
with utils.load_resource(task_args_file) as f:
inputs.update(parse_task_args("task_args_file", f.read()))
+ # task args from suite may override file args.
inputs.update(parse_task_args("task_args", task_args))
except TypeError:
raise TypeError()