summaryrefslogtreecommitdiffstats
path: root/ipalib/tests
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-08-11 21:14:07 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-08-11 21:14:07 +0000
commitc1a125256b302eceebcee5464f1447fc8e49fdf7 (patch)
tree2fc5f3ff21239fb28f52b8468163b33c4792f411 /ipalib/tests
parent92824182911007ce3e9cf4f858f70434594ee5dd (diff)
downloadfreeipa-c1a125256b302eceebcee5464f1447fc8e49fdf7.tar.gz
freeipa-c1a125256b302eceebcee5464f1447fc8e49fdf7.tar.xz
freeipa-c1a125256b302eceebcee5464f1447fc8e49fdf7.zip
111: Minor changes to mthd and prop classes; updated mthd and prop unit tests
Diffstat (limited to 'ipalib/tests')
-rw-r--r--ipalib/tests/test_public.py23
1 files changed, 16 insertions, 7 deletions
diff --git a/ipalib/tests/test_public.py b/ipalib/tests/test_public.py
index d6f3dbbe1..132cd1ccd 100644
--- a/ipalib/tests/test_public.py
+++ b/ipalib/tests/test_public.py
@@ -300,15 +300,24 @@ def test_attr():
assert read_only(i, 'obj') == 'the user obj'
-def test_mthd():
- cls = public.mthd
- assert issubclass(cls, public.attr)
- assert issubclass(cls, public.cmd)
+class test_mthd(ClassChecker):
+ """
+ Tests the `mthd` class.
+ """
+ _cls = public.mthd
+
+ def test_class(self):
+ assert self.cls.__bases__ == (public.attr, public.cmd)
+ assert self.cls.implements(public.cmd)
-def test_prop():
- cls = public.prop
- assert issubclass(cls, public.attr)
+class test_prop(ClassChecker):
+ _cls = public.prop
+
+ def test_class(self):
+ assert self.cls.__bases__ == (public.attr, public.option)
+ assert self.cls.implements(public.option)
+
def test_PublicAPI():