'Init method.
Usage example:
with _TestCloudMLHook(self, responses, expected_requests) as hook:
self.run_my_test(hook)
Args:
test_cls: The caller\'s instance used for test communication.
responses: A list of (dict_response, response_content) tuples.
expected_requests: A list of (uri, http_method, body) tuples.'

def __init__(self, test_cls, responses, expected_requests):

    self._test_cls = test_cls
    self._responses = responses
    self._expected_requests = [self._normalize_requests_for_comparison(x[0], x[1], x[2]) for x in expected_requests]
    self._actual_requests = []
