'Returns an XML document containing a successful replace_result response.'

def create_response_object(self, status, xml, major_code='<imsx_codeMajor>success</imsx_codeMajor>'):

    response = MagicMock()
    response.status_code = status
    response.content = xml.format(major_code=major_code).encode('ascii', 'ignore')
    return response
