'Create a course that is closed for enrollment, and sign in as a user.'

def setUp(self):

    super(EnrollmentClosedRedirectTest, self).setUp()
    course = CourseFixture(self.course_info['org'], self.course_info['number'], self.course_info['run'], self.course_info['display_name'])
    now = datetime.now(pytz.UTC)
    course.add_course_details({'enrollment_start': (now - timedelta(days=30)).isoformat(), 'enrollment_end': (now - timedelta(days=1)).isoformat()})
    course.install()
    ModeCreationPage(self.browser, self.course_id).visit()
    ModeCreationPage(self.browser, self.course_id, mode_slug=u'verified', mode_display_name=u'Verified    Certificate', min_price=10, suggested_prices='10,20').visit()
