def test_get_sth_raises_on_invalid_base64(self): json_sth = test_util.sth_to_json(test_util.DEFAULT_STH) json_sth["tree_head_signature"] = "garbagebase64^^^" client = self.one_shot_client(json_sth) self.assertRaises(log_client.InvalidResponseError, client.get_sth)
def test_get_sth_raises_on_invalid_response(self): json_sth = test_util.sth_to_json(test_util.DEFAULT_STH) json_sth.pop("timestamp") client = self.one_shot_client(json_sth) self.assertRaises(log_client.InvalidResponseError, client.get_sth)