diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-08-08 21:28:56 +0000 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-08-08 21:28:56 +0000 |
commit | 58a3b1d0915f32326e9387bc4978c53a16e5f217 (patch) | |
tree | 29884fbb3d4ccc30aed8bfea949412a2609f9713 /ipalib/tests | |
parent | 6dc60a18c7929e3a1f0fee6aeb06913cc8921ccc (diff) | |
download | freeipa-58a3b1d0915f32326e9387bc4978c53a16e5f217.tar.gz freeipa-58a3b1d0915f32326e9387bc4978c53a16e5f217.tar.xz freeipa-58a3b1d0915f32326e9387bc4978c53a16e5f217.zip |
85: Added ReadOnly._lock() method to make class easier to use; updated subclasses and unit tests
Diffstat (limited to 'ipalib/tests')
-rw-r--r-- | ipalib/tests/test_plugable.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ipalib/tests/test_plugable.py b/ipalib/tests/test_plugable.py index ad1645f12..af6ee0c94 100644 --- a/ipalib/tests/test_plugable.py +++ b/ipalib/tests/test_plugable.py @@ -139,6 +139,7 @@ def test_Plugin(): def test_ReadOnly(): obj = plugable.ReadOnly() + obj._lock() names = ['not_an_attribute', 'an_attribute'] for name in names: no_set(obj, name) @@ -146,7 +147,8 @@ def test_ReadOnly(): class some_ro_class(plugable.ReadOnly): def __init__(self): - object.__setattr__(self, 'an_attribute', 'Hello world!') + self.an_attribute = 'Hello world!' + self._lock() obj = some_ro_class() for name in names: no_set(obj, name) |