diff options
author | Shankaranarayanan Puzhavakath Narayanan <snarayanan@research.att.com> | 2020-03-09 15:08:56 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-03-09 15:08:56 +0000 |
commit | bfb0a45de2eaade4064c40d294fd56e89672d199 (patch) | |
tree | 6502e2ab28074671c2439d0a9394b9193ec8a7b0 /test/conductor/test_conductor_translation.py | |
parent | c2b97eaebfcf1f39e1428cdc7b5a3539334087a0 (diff) | |
parent | c1625bd8163ca269ee1a6b25a1f569b97b529b17 (diff) |
Merge "[WIP]Migration to new policy api"
Diffstat (limited to 'test/conductor/test_conductor_translation.py')
-rw-r--r-- | test/conductor/test_conductor_translation.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/conductor/test_conductor_translation.py b/test/conductor/test_conductor_translation.py index ad70157..cc9dc1c 100644 --- a/test/conductor/test_conductor_translation.py +++ b/test/conductor/test_conductor_translation.py @@ -28,7 +28,7 @@ class TestConductorTranslation(unittest.TestCase): self.main_dir = "" self.conductor_api_template = self.main_dir + "osdf/templates/conductor_interface.json" self.local_config_file = self.main_dir + "config/common_config.yaml" - policy_data_path = self.main_dir + "test/policy-local-files" + policy_data_path = self.main_dir + "test/policy-local-files/new_policies" valid_policies_list_file = policy_data_path + '/' + 'meta-valid-policies.txt' valid_policies_files = local_policies.get_policy_names_from_file(valid_policies_list_file) @@ -44,13 +44,15 @@ class TestConductorTranslation(unittest.TestCase): def test_gen_demands(self): # need to run this only on vnf policies - vnf_policies = [x for x in self.policies if x["content"]["policyType"] == "vnfPolicy"] + vnf_policies = [x for x in self.policies if x[list(x.keys())[0]]["type"] + == "onap.policies.optimization.VnfPolicy"] res = tr.gen_demands(self.request_json, vnf_policies) assert res is not None def test_gen_vfmod_demands(self): # need to run this only on vnf policies - vnf_policies = [x for x in self.policies if x["content"]["policyType"] == "vnfPolicy"] + vnf_policies = [x for x in self.policies if x[list(x.keys())[0]]["type"] + == "onap.policies.optimization.VnfPolicy"] res = tr.gen_demands(self.request_vfmod_json, vnf_policies) assert res is not None |