def _mock_response(<EOL>self,<EOL>status_code=<NUM_LIT:200>,<EOL>content=b'<STR_LIT>',<EOL>raise_for_status=None):
mock_resp = Mock()<EOL>mock_resp.raise_for_status = Mock()<EOL>mock_resp.status_code = status_code<EOL>if raise_for_status:<EOL><INDENT>mock_resp.raise_for_status.side_effect = raise_for_status<EOL>return mock_resp<EOL><DEDENT>mock_resp.content = content<EOL>mock_resp.iter_content = Mock()<EOL>iter_result =  iter([bytes([b]) for b in content])<EOL>mock_resp.iter_content.return_value = iter_result<EOL>return mock_resp<EOL>
Build a mock for each response, include errors and content data