'Assert that calling callableObj with *args and **kwargs raises an
exception of type excClass, and return the exception object so that
further tests on it can be performed.'

def checkRaises(self, excClass, callableObj, *args, **kwargs):

    try:
        callableObj(*args, **kwargs)
    except excClass as e:
        return e
    else:
        raise self.failureException(('Expected    exception    %s    not    raised' % excClass))
