X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=test%2Ftest_get_opt_query_data.py;h=8e6c32470d28d128319f8f9cbf33ec1446d8aa09;hb=HEAD;hp=1e2db1776871f192b4eddeb0f8551ce4b2ebd111;hpb=fc3ead31e631f69fabf0baaa20c10bf955ce374b;p=optf%2Fosdf.git diff --git a/test/test_get_opt_query_data.py b/test/test_get_opt_query_data.py index 1e2db17..8e6c324 100644 --- a/test/test_get_opt_query_data.py +++ b/test/test_get_opt_query_data.py @@ -1,5 +1,6 @@ # ------------------------------------------------------------------------- # Copyright (c) 2017-2018 AT&T Intellectual Property +# Copyright (C) 2020 Wipro Limited. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,7 +18,7 @@ # import unittest import json -from osdf.optimizers.placementopt.conductor.translation import get_opt_query_data +from osdf.adapters.conductor.translation import get_opt_query_data class TestGetOptQueryData(unittest.TestCase): @@ -30,7 +31,7 @@ class TestGetOptQueryData(unittest.TestCase): query_policy_data_file = ["QueryPolicy_vCPE.json"] request_json = json.loads(open(parameter_data_file).read()) policies = [json.loads(open(policy_data_path + file).read()) for file in query_policy_data_file] - req_param_dict = get_opt_query_data(request_json, policies) + req_param_dict = get_opt_query_data(request_json['placementInfo']['requestParameters'], policies) self.assertTrue(req_param_dict is not None) @@ -42,7 +43,7 @@ class TestGetOptQueryData(unittest.TestCase): query_policy_data_file = ["QueryPolicy_vFW_TD.json"] request_json = json.loads(open(parameter_data_file).read()) policies = [json.loads(open(policy_data_path + file).read()) for file in query_policy_data_file] - req_param_dict = get_opt_query_data(request_json, policies) + req_param_dict = get_opt_query_data(request_json['placementInfo']['requestParameters'], policies) self.assertTrue(req_param_dict is not None)