diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-12-17 21:47:43 -0700 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-12-17 21:47:43 -0700 |
commit | 69041c3b1b2494d89097e490048c23292c8cbc52 (patch) | |
tree | ded37a0888618207720147fdcca1c5f7a3fa8b15 /tests/test_ipalib | |
parent | ba481e7712b9d92694a38399936fd0eceef93cb6 (diff) | |
download | freeipa-69041c3b1b2494d89097e490048c23292c8cbc52.tar.gz freeipa-69041c3b1b2494d89097e490048c23292c8cbc52.tar.xz freeipa-69041c3b1b2494d89097e490048c23292c8cbc52.zip |
Removed Plugin.name property and replaced with instance attribute created in Plugin.__init__()
Diffstat (limited to 'tests/test_ipalib')
-rw-r--r-- | tests/test_ipalib/test_plugable.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/test_ipalib/test_plugable.py b/tests/test_ipalib/test_plugable.py index 6b3b3e6c..00dc5241 100644 --- a/tests/test_ipalib/test_plugable.py +++ b/tests/test_ipalib/test_plugable.py @@ -303,19 +303,23 @@ class test_Plugin(ClassChecker): """ assert self.cls.__bases__ == (plugable.ReadOnly,) assert self.cls.__public__ == frozenset() - assert type(self.cls.name) is property assert type(self.cls.doc) is property assert type(self.cls.api) is property - def test_name(self): + def test_init(self): """ - Test the `ipalib.plugable.Plugin.name` property. + Test the `ipalib.plugable.Plugin.__init__` method. """ - assert read_only(self.cls(), 'name') == 'Plugin' - + o = self.cls() + assert o.name == 'Plugin' + assert o.module == 'ipalib.plugable' + assert o.fullname == 'ipalib.plugable.Plugin' class some_subclass(self.cls): pass - assert read_only(some_subclass(), 'name') == 'some_subclass' + o = some_subclass() + assert o.name == 'some_subclass' + assert o.module == __name__ + assert o.fullname == '%s.some_subclass' % __name__ def test_doc(self): """ |