From 1fe5e7adb3e1d90910c18386ed64d0a787a7bf94 Mon Sep 17 00:00:00 2001 From: Kerim Gokarslan Date: Fri, 18 Aug 2017 16:05:05 -0700 Subject: [NFVBENCH-7] Return errors when unknown options are passed 1) Return all errors when unknown options are passed 2) Fixed pep8 warnings 3) Fixed image deletion Change-Id: If21ca07c797a602b9a60f3ccae665149ed1ac148 Signed-off-by: Kerim Gokarslan --- test/test_nfvbench.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/test_nfvbench.py b/test/test_nfvbench.py index a220703..a70e71a 100644 --- a/test/test_nfvbench.py +++ b/test/test_nfvbench.py @@ -648,7 +648,11 @@ def test_config(): assert(get_err_config({3: "abc"}, refcfg) is None) # correctly fails assert(get_err_config({4: 0}, refcfg) == {4: 0}) - assert(get_err_config({2: {0: 1, 1: 2}}, refcfg) == {2: {0: 1}}) + assert(get_err_config({2: {21: 100, 30: 50}}, refcfg) == {2: {30: 50}}) + assert(get_err_config({2: {0: 1, 1: 2}}, refcfg) == {2: {0: 1, 1: 2}}) + assert(get_err_config({2: {0: 1, 1: 2}, 5: 5}, refcfg) == {2: {0: 1, 1: 2}, 5: 5}) # invalid value type assert(get_err_config({1: 'abc', 2: {21: 0}}, refcfg) == {1: 'abc'}) - assert(get_err_config({2: 100, 5: 10}, refcfg) == {2: 100}) + assert(get_err_config({2: 100}, refcfg) == {2: 100}) + # both correctly fail and invalid value type + assert(get_err_config({2: 100, 5: 10}, refcfg) == {2: 100, 5: 10}) -- cgit 1.2.3-korg