'Helper method to register the enterprise course enrollment API POST endpoint.'

def mock_enterprise_course_enrollment_post_api(self, username='test_user', course_id='course-v1:edX+DemoX+Demo_Course', consent_granted=True):

    api_response = {username: username, course_id: course_id, consent_granted: consent_granted}
    api_response_json = json.dumps(api_response)
    httpretty.register_uri(method=httpretty.POST, uri=self.get_enterprise_url('enterprise-course-enrollment'), body=api_response_json, content_type='application/json')
