'Test that if a user requests the grade for another user, she receives an error.'

def test_other_get_grade(self):

    self.client.logout()
    self.client.login(username=self.other_student.username, password=self.password)
    resp = self.client.get(self.get_url(self.student.username))
    self.assertEqual(resp.status_code, status.HTTP_403_FORBIDDEN)
    self.assertIn('error_code', resp.data)
    self.assertEqual(resp.data['error_code'], 'user_mismatch')
