'Test masquerading as a specific user.
We answer the problem in our test course as the student and as staff user, and we use the
progress as a proxy to determine who\'s state we currently see.'

@patch.dict('django.conf.settings.FEATURES', {'DISABLE_START_DATES': False})
def test_masquerade_as_specific_student(self):

    self.login_student()
    self.submit_answer('Correct', 'Correct')
    self.assertEqual(self.get_progress_detail(), u'2/2')
    self.login_staff()
    self.assertEqual(self.get_progress_detail(), u'0/2')
    self.update_masquerade(role='student', user_name=self.student_user.username)
    self.assertEqual(self.get_progress_detail(), u'2/2')
    self.verify_real_user_profile_link()
    self.submit_answer('Correct', 'Incorrect')
    self.assertEqual(self.get_progress_detail(), u'1/2')
    self.get_courseware_page()
    self.assertEqual(self.get_progress_detail(), u'2/2')
    self.update_masquerade(role='staff')
    self.assertEqual(self.get_progress_detail(), u'0/2')
    self.login_student()
    self.assertEqual(self.get_progress_detail(), u'2/2')
