'Tests entrance exam xblock has `entrance_exam_passed` key in json response.'

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

    request_factory = RequestFactory()
    data = {'input_{}_2_1'.format(unicode(self.problem_1.location.html_id())): 'choice_2'}
    request = request_factory.post('problem_check', data=data)
    request.user = self.user
    response = handle_xblock_callback(request, unicode(self.course.id), unicode(self.problem_1.location), 'xmodule_handler', 'problem_check')
    self.assertEqual(response.status_code, 200)
    self.assertIn('entrance_exam_passed', response.content)
