From 5eac2ea15fbef4fcd2f0a182e41bd4f6f5725d2a Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Fri, 1 Aug 2008 06:02:29 +0000 Subject: 37: Renamed tstutil.yes_raises() to raises(); changed test_plugable.py to use raises() throughout --- ipalib/tests/tstutil.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ipalib/tests/tstutil.py') diff --git a/ipalib/tests/tstutil.py b/ipalib/tests/tstutil.py index b9c6e15d..37b7745f 100644 --- a/ipalib/tests/tstutil.py +++ b/ipalib/tests/tstutil.py @@ -35,7 +35,7 @@ class ExceptionNotRaised(Exception): return self.msg % self.expected.__name__ -def yes_raises(exception, callback, *args, **kw): +def raises(exception, callback, *args, **kw): """ Tests that the expected exception is raised; raises ExceptionNotRaised if test fails. @@ -53,14 +53,14 @@ def no_set(obj, name, value='some_new_obj'): """ Tests that attribute cannot be set. """ - yes_raises(AttributeError, setattr, obj, name, value) + raises(AttributeError, setattr, obj, name, value) def no_del(obj, name): """ Tests that attribute cannot be deleted. """ - yes_raises(AttributeError, delattr, obj, name) + raises(AttributeError, delattr, obj, name) def read_only(obj, name, value='some_new_obj'): -- cgit