'Gets the rerun state object for self.course_key and verifies that the values
of its fields equal self.expected_rerun_state.'

def verify_rerun_state(self):

    found_rerun = CourseRerunState.objects.find_first(course_key=self.course_key)
    found_rerun_state = {key: getattr(found_rerun, key) for key in self.expected_rerun_state}
    self.assertDictEqual(found_rerun_state, self.expected_rerun_state)
    return found_rerun
