summaryrefslogtreecommitdiffstats
path: root/ipalib/tests/test_public.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/tests/test_public.py')
-rw-r--r--ipalib/tests/test_public.py19
1 files changed, 15 insertions, 4 deletions
diff --git a/ipalib/tests/test_public.py b/ipalib/tests/test_public.py
index a6ae7d8e..95bb7b9c 100644
--- a/ipalib/tests/test_public.py
+++ b/ipalib/tests/test_public.py
@@ -321,10 +321,21 @@ class test_cmd(ClassChecker):
assert 'execute' in self.cls.__public__ # Public
-def test_obj():
- cls = public.obj
- assert issubclass(cls, plugable.Plugin)
+class test_Object(ClassChecker):
+ """
+ Tests the `public.Object` class.
+ """
+ _cls = public.Object
+
+ def test_class(self):
+ assert self.cls.__bases__ == (plugable.Plugin,)
+ assert type(self.cls.Method) is property
+ assert type(self.cls.Property) is property
+ def test_init(self):
+ o = self.cls()
+ assert read_only(o, 'Method') is None
+ assert read_only(o, 'Property') is None
class test_Attribute(ClassChecker):
@@ -350,7 +361,7 @@ class test_Attribute(ClassChecker):
def test_finalize(self):
user_obj = 'The user public.Object instance'
class api(object):
- obj = dict(user=user_obj)
+ Object = dict(user=user_obj)
class user_add(self.cls):
pass
o = user_add()