'Verify that if the user\'s enrollment is not of the same type as the course run,
the course will only count as in progress if there is another available seat with
the right type for which the upgrade deadline has not passed.'

@ddt.data(None, 1, (-1))
def test_in_progress_course_upgrade_deadline_check(self, offset, mock_get_programs):

    course_run_key = generate_course_run_key()
    now = datetime.datetime.now(utc)
    upgrade_deadline = (None if (not offset) else str((now + datetime.timedelta(days=offset))))
    required_seat = SeatFactory(type='verified', upgrade_deadline=upgrade_deadline)
    enrolled_seat = SeatFactory(type='audit')
    seats = [required_seat, enrolled_seat]
    data = [ProgramFactory(courses=[CourseFactory(course_runs=[CourseRunFactory(key=course_run_key, type='verified', seats=seats)])])]
    mock_get_programs.return_value = data
    CourseEnrollmentFactory(user=self.user, course_id=course_run_key, mode='audit')
    meter = ProgramProgressMeter(self.site, self.user)
    program = data[0]
    expected = [ProgressFactory(uuid=program['uuid'], completed=0, in_progress=(1 if (offset in [None, 1]) else 0), not_started=(1 if (offset in [(-1)]) else 0))]
    self.assertEqual(meter.progress(count_only=True), expected)
