'Asserts that accessing the given `endpoint` gets a response of `status_code`.
endpoint: string, endpoint for instructor dash API
args: dict, kwargs for `reverse` call
status_code: expected HTTP status code response
msg: message to display if assertion fails.'

def _access_endpoint(self, endpoint, args, status_code, msg):

    url = reverse(endpoint, kwargs={'course_id': self.course.id.to_deprecated_string()})
    if (endpoint in INSTRUCTOR_GET_ENDPOINTS):
        response = self.client.get(url, args)
    else:
        response = self.client.post(url, args)
    self.assertEqual(response.status_code, status_code, msg=msg)
