'Context manager that clears the environment upon failure.'

@contextmanager
def _assertRaises(self, exception):

    with super(BaseCase, self).assertRaises(exception) as cm:
        with self.env.clear_upon_failure():
            (yield cm)
