summaryrefslogtreecommitdiffstats
path: root/test/test_get_opt_query_data.py
diff options
context:
space:
mode:
authorkrishnaa96 <krishna.moorthy6@wipro.com>2020-03-10 10:55:13 +0530
committerkrishnaa96 <krishna.moorthy6@wipro.com>2020-03-20 20:39:59 +0530
commitf30da9513ae0501f453ee93729b381270fad0a2b (patch)
treea3ab005e2f16bfe8709bdcfbab6d28b5c6760a19 /test/test_get_opt_query_data.py
parent420f4b3a4ca25d5de5c9318b2ca89e1ef126b278 (diff)
Add generic conductor interface
Issue-ID: OPTFRA-715 Signed-off-by: krishnaa96 <krishna.moorthy6@wipro.com> Change-Id: I84218ab65e645a90d2ff1c365bdde1e06ab27d2e
Diffstat (limited to 'test/test_get_opt_query_data.py')
-rw-r--r--test/test_get_opt_query_data.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/test_get_opt_query_data.py b/test/test_get_opt_query_data.py
index a7a4d88..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 apps.placement.optimizers.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)