diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2012-02-02 23:25:53 +0000 |
|---|---|---|
| committer | Mark McLoughlin <markmc@redhat.com> | 2012-02-02 23:27:27 +0000 |
| commit | d383f78f8ca27eaf982d150fd8c955f8bd451690 (patch) | |
| tree | 161548022f15e27fb3b35a05b98960e42791b44e /tests | |
| parent | 8441babf22a597de4a526ec11538cb0c6b503646 (diff) | |
Makes common/cfg.py raise AttributeError
* fixes bug 915039
* includes test
Change-Id: I67b886be3b5af3763f52fffe54085975d61d61eb
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unit/test_cfg.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit/test_cfg.py b/tests/unit/test_cfg.py index 7d2ad0d..c93f444 100644 --- a/tests/unit/test_cfg.py +++ b/tests/unit/test_cfg.py @@ -763,6 +763,11 @@ class SadPathTestCase(BaseTestCase): self.assertFalse(hasattr(self.conf, 'foo')) self.assertRaises(NoSuchOptError, getattr, self.conf, 'foo') + def test_unknown_attr_is_attr_error(self): + self.conf([]) + self.assertFalse(hasattr(self.conf, 'foo')) + self.assertRaises(AttributeError, getattr, self.conf, 'foo') + def test_unknown_group_attr(self): self.conf.register_group(OptGroup('blaa')) |
