From fadbae642053565be1d10bc5d6b40b151a97ff16 Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Thu, 7 Aug 2008 03:38:49 +0000 Subject: 72: Started work on public.opt class; added corresponding unit tests --- ipalib/tests/tstutil.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ipalib/tests/tstutil.py') 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) -- cgit