'Test that a user receives an error if she requests
her own grade in a course where she is not enrolled.'

def test_self_get_grade_not_enrolled(self):

    self.client.logout()
    self.client.login(username=self.other_user.username, password=self.password)
    resp = self.client.get(self.get_url(self.other_user.username))
    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')
