diff options
author | Davanum Srinivas <dims@linux.vnet.ibm.com> | 2013-08-01 21:43:32 -0400 |
---|---|---|
committer | Davanum Srinivas <dims@linux.vnet.ibm.com> | 2013-08-01 22:05:04 -0400 |
commit | c85c8e6c4d5a921aa36a4774fe6bd8ab07d58fb3 (patch) | |
tree | 9bcf8435b9caefd7144ca7dfbce6f5b0c2fdc9f8 /tests/test_cfg.py | |
parent | 8470e71e8b0fab7db9a73ddaf4b122c592ed6d60 (diff) | |
download | oslo-config-c85c8e6c4d5a921aa36a4774fe6bd8ab07d58fb3.tar.gz |
NoSuchOptError should be used not AttributeError
Switch back to previous behavior. Looks like we are missing a test to
enforce the old behavior that everyone depends on
Fixes LP# 1207541
Change-Id: I79c58cfcf619a461f6a42a4dccfa9141bc1033a0
Diffstat (limited to 'tests/test_cfg.py')
-rw-r--r-- | tests/test_cfg.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/test_cfg.py b/tests/test_cfg.py index 1235ca0..086e55b 100644 --- a/tests/test_cfg.py +++ b/tests/test_cfg.py @@ -2158,6 +2158,7 @@ class SadPathTestCase(BaseTestCase): self.assertFalse(hasattr(self.conf, 'foo')) self.assertRaises(AttributeError, getattr, self.conf, 'foo') self.assertRaises(cfg.NoSuchOptError, self.conf._get, 'foo') + self.assertRaises(cfg.NoSuchOptError, self.conf.__getattr__, 'foo') def test_unknown_attr_is_attr_error(self): self.conf([]) |