X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=utils%2Ftest%2Ftestapi%2Fopnfv_testapi%2Fcommon%2Fcheck.py;h=67e8fbd409ab9005d30404f825582429c48a27b1;hb=46b716130c196dabb4b90fd021cfbcda28b468f4;hp=4d9902cd06433b2dc24c9d08d72fb791dd25b0a7;hpb=42b51b59fa7271731cc09995c1355db4e9ac426c;p=releng.git diff --git a/utils/test/testapi/opnfv_testapi/common/check.py b/utils/test/testapi/opnfv_testapi/common/check.py index 4d9902cd0..67e8fbd40 100644 --- a/utils/test/testapi/opnfv_testapi/common/check.py +++ b/utils/test/testapi/opnfv_testapi/common/check.py @@ -61,7 +61,7 @@ def no_body(xstep): def miss_fields(xstep): @functools.wraps(xstep) def wrap(self, *args, **kwargs): - fields = kwargs.get('miss_fields') + fields = kwargs.pop('miss_fields', []) if fields: for miss in fields: miss_data = self.json_args.get(miss) @@ -75,7 +75,7 @@ def miss_fields(xstep): def carriers_exist(xstep): @functools.wraps(xstep) def wrap(self, *args, **kwargs): - carriers = kwargs.get('carriers') + carriers = kwargs.pop('carriers', {}) if carriers: for table, query in carriers: exist = yield self._eval_db_find_one(query(), table) @@ -102,7 +102,7 @@ def new_not_exists(xstep): def updated_one_not_exist(xstep): @functools.wraps(xstep) def wrap(self, data, *args, **kwargs): - db_keys = kwargs.get('db_keys') + db_keys = kwargs.pop('db_keys', []) query = self._update_query(db_keys, data) if query: to_data = yield self._eval_db_find_one(query)