def test_check_database_handles_exception(self): response = checks._check_database('foo') self.assertFalse(response['foo']['ok']) self.assertEqual(response['foo']['error'], "The connection foo doesn't exist")