summaryrefslogtreecommitdiffstats
path: root/ipalib/tests
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-09-24 23:19:34 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-09-24 23:19:34 +0000
commitc3b09b2116dcbab36098f11c6b3684a6d0e47c08 (patch)
tree8180aecb42f10ec22d65b658f3741f3500d96dd7 /ipalib/tests
parent3d6ab69b46e5be32af94ecdfb5a696973eeaf7c4 (diff)
downloadfreeipa-c3b09b2116dcbab36098f11c6b3684a6d0e47c08.tar.gz
freeipa-c3b09b2116dcbab36098f11c6b3684a6d0e47c08.tar.xz
freeipa-c3b09b2116dcbab36098f11c6b3684a6d0e47c08.zip
352: Now removed Object.Property property and added in its place Object.properties instance attribute
Diffstat (limited to 'ipalib/tests')
-rw-r--r--ipalib/tests/test_frontend.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/ipalib/tests/test_frontend.py b/ipalib/tests/test_frontend.py
index f0ba524d5..0109934de 100644
--- a/ipalib/tests/test_frontend.py
+++ b/ipalib/tests/test_frontend.py
@@ -760,7 +760,9 @@ class test_Object(ClassChecker):
def test_class(self):
assert self.cls.__bases__ == (plugable.Plugin,)
- assert type(self.cls.Property) is property
+ assert self.cls.methods is None
+ assert self.cls.properties is None
+ assert self.cls.takes_params == tuple()
def test_init(self):
"""
@@ -768,7 +770,7 @@ class test_Object(ClassChecker):
"""
o = self.cls()
assert o.methods is None
- assert read_only(o, 'Property') is None
+ assert o.properties is None
def test_set_api(self):
"""
@@ -798,7 +800,7 @@ class test_Object(ClassChecker):
cnt = 10
formats = dict(
methods='method_%d',
- Property='property_%d',
+ properties='property_%d',
)
class api(object):
@@ -806,7 +808,7 @@ class test_Object(ClassChecker):
get_attributes(cnt, formats['methods'])
)
Property = plugable.NameSpace(
- get_attributes(cnt, formats['Property'])
+ get_attributes(cnt, formats['properties'])
)
assert len(api.Method) == cnt * 3
assert len(api.Property) == cnt * 3
@@ -818,7 +820,7 @@ class test_Object(ClassChecker):
o = user()
o.set_api(api)
assert read_only(o, 'api') is api
- for name in ['methods', 'Property']:
+ for name in ['methods', 'properties']:
namespace = getattr(o, name)
assert isinstance(namespace, plugable.NameSpace)
assert len(namespace) == cnt
@@ -919,7 +921,7 @@ class test_Method(ClassChecker):
),
])
return self.__prop
- Property = property(__get_prop)
+ properties = property(__get_prop)
type_ = ipa_types.Unicode()
class noun_verb(self.cls):
takes_options= (