summaryrefslogtreecommitdiffstats
path: root/ipalib/tests/test_plugable.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-08-08 23:26:17 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-08-08 23:26:17 +0000
commit45201e31c1b7be7cb770d2e864c307c95e743751 (patch)
tree25c976e1765f2421afb7cc01c59953543456819c /ipalib/tests/test_plugable.py
parente3811f3f45adf977ade6468221368efb7f92294f (diff)
downloadfreeipa.git-45201e31c1b7be7cb770d2e864c307c95e743751.tar.gz
freeipa.git-45201e31c1b7be7cb770d2e864c307c95e743751.tar.xz
freeipa.git-45201e31c1b7be7cb770d2e864c307c95e743751.zip
92: Added ProxyTarget.name property; added corresponding unit tests
Diffstat (limited to 'ipalib/tests/test_plugable.py')
-rw-r--r--ipalib/tests/test_plugable.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/ipalib/tests/test_plugable.py b/ipalib/tests/test_plugable.py
index c3245e77..25f52099 100644
--- a/ipalib/tests/test_plugable.py
+++ b/ipalib/tests/test_plugable.py
@@ -55,7 +55,7 @@ def test_valid_identifier():
class test_ReadOnly(ClassChecker):
"""
- Test the plugable.ReadOnly class
+ Test the `ReadOnly` class
"""
_cls = plugable.ReadOnly
@@ -103,17 +103,28 @@ class test_ReadOnly(ClassChecker):
class test_ProxyTarget(ClassChecker):
"""
- Test the plugable.ProxyTarget class.
+ Test the `ProxyTarget` class.
"""
_cls = plugable.ProxyTarget
def test_class(self):
assert self.cls.__bases__ == (plugable.ReadOnly,)
+ assert type(self.cls.name) is property
assert self.cls.implements(frozenset())
+ def test_name(self):
+ """
+ Test the `name` property.
+ """
+ assert read_only(self.cls(), 'name') == 'ProxyTarget'
+
+ class some_subclass(self.cls):
+ pass
+ assert read_only(some_subclass(), 'name') == 'some_subclass'
+
def test_implements(self):
"""
- Test the implements() classmethod
+ Test the `implements` classmethod.
"""
class example(self.cls):
__public__ = frozenset((