summaryrefslogtreecommitdiffstats
path: root/ipalib/tests/tstutil.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-08-07 03:38:49 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-08-07 03:38:49 +0000
commitfadbae642053565be1d10bc5d6b40b151a97ff16 (patch)
tree1ae0cd72ef0b97ca5ffc6419545efd510256782b /ipalib/tests/tstutil.py
parentf904cb0422194dc55cf74366145b2cf20299b657 (diff)
downloadfreeipa.git-fadbae642053565be1d10bc5d6b40b151a97ff16.tar.gz
freeipa.git-fadbae642053565be1d10bc5d6b40b151a97ff16.tar.xz
freeipa.git-fadbae642053565be1d10bc5d6b40b151a97ff16.zip
72: Started work on public.opt class; added corresponding unit tests
Diffstat (limited to 'ipalib/tests/tstutil.py')
-rw-r--r--ipalib/tests/tstutil.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/ipalib/tests/tstutil.py b/ipalib/tests/tstutil.py
index 12ca119d..cdac4547 100644
--- a/ipalib/tests/tstutil.py
+++ b/ipalib/tests/tstutil.py
@@ -43,10 +43,11 @@ def raises(exception, callback, *args, **kw):
raised = False
try:
callback(*args, **kw)
- except exception:
+ except exception, e:
raised = True
if not raised:
raise ExceptionNotRaised(exception)
+ return e
def getitem(obj, key):
@@ -83,3 +84,9 @@ def read_only(obj, name, value='some_new_obj'):
# Return the attribute
return getattr(obj, name)
+
+
+class ClassChecker(object):
+
+ def new(self, *args, **kw):
+ return self.cls(*args, **kw)