summaryrefslogtreecommitdiffstats
path: root/tests/test_ipalib
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-12-17 21:57:58 -0700
committerJason Gerard DeRose <jderose@redhat.com>2008-12-17 21:57:58 -0700
commit171ed58367e58c59f9f67ef831f08ce80ba8508b (patch)
tree6780dd636ca73590cde823f72e331b179cab5b7a /tests/test_ipalib
parent69041c3b1b2494d89097e490048c23292c8cbc52 (diff)
downloadfreeipa-171ed58367e58c59f9f67ef831f08ce80ba8508b.tar.gz
freeipa-171ed58367e58c59f9f67ef831f08ce80ba8508b.tar.xz
freeipa-171ed58367e58c59f9f67ef831f08ce80ba8508b.zip
Removed Plugin.doc property and replaced with instance attribute created in Plugin.__init__()
Diffstat (limited to 'tests/test_ipalib')
-rw-r--r--tests/test_ipalib/test_plugable.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/tests/test_ipalib/test_plugable.py b/tests/test_ipalib/test_plugable.py
index 00dc52418..02df058b8 100644
--- a/tests/test_ipalib/test_plugable.py
+++ b/tests/test_ipalib/test_plugable.py
@@ -303,7 +303,6 @@ class test_Plugin(ClassChecker):
"""
assert self.cls.__bases__ == (plugable.ReadOnly,)
assert self.cls.__public__ == frozenset()
- assert type(self.cls.doc) is property
assert type(self.cls.api) is property
def test_init(self):
@@ -314,20 +313,20 @@ class test_Plugin(ClassChecker):
assert o.name == 'Plugin'
assert o.module == 'ipalib.plugable'
assert o.fullname == 'ipalib.plugable.Plugin'
+ assert o.doc == self.cls.__doc__
class some_subclass(self.cls):
- pass
+ """
+ Do sub-classy things.
+
+ Although it doesn't know how to comport itself and is not for mixed
+ company, this class *is* useful as we all need a little sub-class
+ now and then.
+ """
o = some_subclass()
assert o.name == 'some_subclass'
assert o.module == __name__
assert o.fullname == '%s.some_subclass' % __name__
-
- def test_doc(self):
- """
- Test the `ipalib.plugable.Plugin.doc` property.
- """
- class some_subclass(self.cls):
- 'here is the doc string'
- assert read_only(some_subclass(), 'doc') == 'here is the doc string'
+ assert o.doc == some_subclass.__doc__
def test_implements(self):
"""