'Test that requesting a valid, nonexistent course key returns an error as expected.'

def test_course_does_not_exist(self):

    base_url = reverse(self.namespaced_url, kwargs={'course_id': 'course-v1:MITx+8.MechCX+2014_T1'})
    url = '{0}?username={1}'.format(base_url, self.student.username)
    resp = self.client.get(url)
    self.assertEqual(resp.status_code, status.HTTP_404_NOT_FOUND)
    self.assertIn('error_code', resp.data)
    self.assertEqual(resp.data['error_code'], 'user_or_course_does_not_exist')
