Use self.fail, not self.test.fail, to fail