'Helper method to compare the sequence with the stored exam,
which should just be a single one'

def _verify_exam_data(self, sequence, expected_active):

    exams = get_all_exams_for_course(unicode(self.course.id))
    self.assertEqual(len(exams), 1)
    exam = exams[0]
    if (exam['is_proctored'] and (not exam['is_practice_exam'])):
        exam_review_policy = get_review_policy_by_exam_id(exam['id'])
        self.assertEqual(exam_review_policy['review_policy'], sequence.exam_review_rules)
    if ((not exam['is_proctored']) and (not exam['is_practice_exam'])):
        self.assertEqual(exam['hide_after_due'], sequence.hide_after_due)
    self.assertEqual(exam['course_id'], unicode(self.course.id))
    self.assertEqual(exam['content_id'], unicode(sequence.location))
    self.assertEqual(exam['exam_name'], sequence.display_name)
    self.assertEqual(exam['time_limit_mins'], sequence.default_time_limit_minutes)
    self.assertEqual(exam['is_proctored'], sequence.is_proctored_exam)
    self.assertEqual(exam['is_practice_exam'], sequence.is_practice_exam)
    self.assertEqual(exam['is_active'], expected_active)
