diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-09-22 15:33:32 +0000 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-09-22 15:33:32 +0000 |
commit | 024022c2f9a72480864a855e131f291642b0adfe (patch) | |
tree | 0f5ba021fabf92a8be933561537f9b0aac846e52 | |
parent | b206ef684388da64ee1deb37b064510705dd05bc (diff) | |
download | freeipa.git-024022c2f9a72480864a855e131f291642b0adfe.tar.gz freeipa.git-024022c2f9a72480864a855e131f291642b0adfe.tar.xz freeipa.git-024022c2f9a72480864a855e131f291642b0adfe.zip |
315: Renamed Property.option instance attribute to Property.param
-rw-r--r-- | ipalib/public.py | 11 | ||||
-rw-r--r-- | ipalib/tests/test_public.py | 8 |
2 files changed, 9 insertions, 10 deletions
diff --git a/ipalib/public.py b/ipalib/public.py index e575ac84..678bd2de 100644 --- a/ipalib/public.py +++ b/ipalib/public.py @@ -476,20 +476,19 @@ class Method(Attribute, Command): yield option if self.obj is not None and self.obj.Property is not None: def get_key(p): - o = p.option - if o.required: - if o.default_from is None: + if p.param.required: + if p.param.default_from is None: return 0 return 1 return 2 for prop in sorted(self.obj.Property(), key=get_key): - yield prop.option + yield prop.param class Property(Attribute): __public__ = frozenset(( 'rules', - 'option', + 'param', 'type', )).union(Attribute.__public__) @@ -506,7 +505,7 @@ class Property(Attribute): self.__rules_iter(), key=lambda f: getattr(f, '__name__'), )) - self.option = Param(self.attr_name, self.type, + self.param = Param(self.attr_name, self.type, doc=self.doc, required=self.required, multivalue=self.multivalue, diff --git a/ipalib/tests/test_public.py b/ipalib/tests/test_public.py index a7956907..fa78773f 100644 --- a/ipalib/tests/test_public.py +++ b/ipalib/tests/test_public.py @@ -844,10 +844,10 @@ class test_Property(ClassChecker): o = self.subcls() assert len(o.rules) == 1 assert o.rules[0].__name__ == 'rule0_lowercase' - opt = o.option - assert isinstance(opt, public.Param) - assert opt.name == 'givenname' - assert opt.doc == 'User first name' + param = o.param + assert isinstance(param, public.Param) + assert param.name == 'givenname' + assert param.doc == 'User first name' class test_Application(ClassChecker): |