'Verify the endpoint returns HTTP status 400 if the provided course_key is not an actual CourseKey.'

def test_get_with_invalid_course_key(self):

    url = u'{}?username=edx&course_key=a'.format(reverse(self.view_name))
    response = self.client.get(url)
    self.assertEqual(response.status_code, 400)
    self.assertDictEqual(response.data, {u'detail': u'[a]    is    not    a    valid    course    key.'})
