diff options
author | Sastry Isukapalli <sastry@research.att.com> | 2018-03-17 02:40:15 -0400 |
---|---|---|
committer | Sastry Isukapalli <sastry@research.att.com> | 2018-03-17 07:07:32 +0000 |
commit | 1a9638f5d5fc78f7e8be700e71b506fed3cc9d2d (patch) | |
tree | a5c38fbddd08beeead83c943ab2c744d448944f8 /test/local_data | |
parent | 7c70d5ba1469b9ea3220bc61be1d1973e5e3e98a (diff) |
New policies and required code changes
Issue-ID: OPTFRA-146
Change-Id: I2261ae69f52b184cd7dcb7b86d5905538666a411
Signed-off-by: Sastry Isukapalli <sastry@research.att.com>
Diffstat (limited to 'test/local_data')
-rw-r--r-- | test/local_data/test_local_policies.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/local_data/test_local_policies.py b/test/local_data/test_local_policies.py index 120b186..13154c5 100644 --- a/test/local_data/test_local_policies.py +++ b/test/local_data/test_local_policies.py @@ -15,9 +15,8 @@ # # ------------------------------------------------------------------------- # +import re import unittest -import json -import yaml from osdf.adapters.local_data import local_policies @@ -27,9 +26,12 @@ class TestLocalPolicies(unittest.TestCase): def __init__(self, *args, **kwargs): super(self.__class__, self).__init__(*args, **kwargs) self.folder = './test/policy-local-files' - self.invalid_policies = ['INVALID-one.json', 'INVALID-two.json'] - self.valid_policies = ['CloudAttributePolicy_vG_1.json', 'CloudAttributePolicy_vGMuxInfra_1.json'] - + self.valid_policies_file = self.folder + '/' + 'meta-valid-policies.txt' + self.invalid_policies_file = self.folder + '/' + 'meta-invalid-policies.txt' + self.valid_policies = local_policies.get_policy_names_from_file(self.valid_policies_file) + self.invalid_policies = local_policies.get_policy_names_from_file(self.invalid_policies_file) + + def test_get_local_policies_no_policies(self): with self.assertRaises(FileNotFoundError): res = local_policies.get_local_policies(self.folder, self.invalid_policies) |