summaryrefslogtreecommitdiffstats
path: root/ipalib/tests/test_public.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-09-04 04:39:01 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-09-04 04:39:01 +0000
commitab81ca56fd336af4b83ef19a6f97dffe0b1a0923 (patch)
tree05bebd08f4ae1672b2259f797613346745bb8272 /ipalib/tests/test_public.py
parente1f8619d4adbc15415e2959496640c0f707c54fe (diff)
downloadfreeipa.git-ab81ca56fd336af4b83ef19a6f97dffe0b1a0923.tar.gz
freeipa.git-ab81ca56fd336af4b83ef19a6f97dffe0b1a0923.tar.xz
freeipa.git-ab81ca56fd336af4b83ef19a6f97dffe0b1a0923.zip
255: CLI help, console commands now subclass from public.Application; other tweeking to make CLI utilize Application
Diffstat (limited to 'ipalib/tests/test_public.py')
-rw-r--r--ipalib/tests/test_public.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/ipalib/tests/test_public.py b/ipalib/tests/test_public.py
index 52fb9336..c071832a 100644
--- a/ipalib/tests/test_public.py
+++ b/ipalib/tests/test_public.py
@@ -707,19 +707,20 @@ class test_Application(ClassChecker):
Tests the `public.Application.application` property.
"""
assert 'application' in self.cls.__public__ # Public
+ assert 'set_application' in self.cls.__public__ # Public
app = 'The external application'
class example(self.cls):
'A subclass'
for o in (self.cls(), example()):
- assert o.application is None
- e = raises(TypeError, setattr, o, 'application', None)
+ assert read_only(o, 'application') is None
+ e = raises(TypeError, o.set_application, None)
assert str(e) == (
'%s.application cannot be None' % o.__class__.__name__
)
- o.application = app
- assert o.application is app
- e = raises(AttributeError, setattr, o, 'application', app)
+ o.set_application(app)
+ assert read_only(o, 'application') is app
+ e = raises(AttributeError, o.set_application, app)
assert str(e) == (
'%s.application can only be set once' % o.__class__.__name__
)
- assert o.application is app
+ assert read_only(o, 'application') is app