From 64bb5e2f59ea2f37b3f5ab19b792bf36ce342a2f Mon Sep 17 00:00:00 2001 From: Alexander Gordeev Date: Mon, 5 Aug 2013 13:15:02 +0400 Subject: Fix wrong argument in openstack common policy Fully fixes wrong param passed to the exception constructor from oslo.config occurring in Enforcer._get_policy_path Closes-Bug: #1208397 Change-Id: I28b11178808b447555e6e6e63383904749c77b18 --- tests/unit/test_policy.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/unit') diff --git a/tests/unit/test_policy.py b/tests/unit/test_policy.py index 2ccf71e..3d9e58d 100644 --- a/tests/unit/test_policy.py +++ b/tests/unit/test_policy.py @@ -208,6 +208,11 @@ class EnforcerTest(PolicyBaseTestCase): self.assertEquals(self.enforcer.rules, {'test': 'test', 'test1': 'test1'}) + def test_get_policy_path_raises_exc(self): + enforcer = policy.Enforcer(policy_file='raise_error.json') + self.assertRaises(cfg.ConfigFilesNotFoundError, + enforcer._get_policy_path) + class FakeCheck(policy.BaseCheck): def __init__(self, result=None): -- cgit