'A schedule should be created for every new enrollment if the switch is active.'

def test_create_schedule(self):

    SWITCH_NAME = 'enable-create-schedule-receiver'
    switch_namesapce = WaffleSwitchNamespace('schedules')
    with switch_namesapce.override(SWITCH_NAME, True):
        enrollment = CourseEnrollmentFactory()
        self.assertIsNotNone(enrollment.schedule)
    with switch_namesapce.override(SWITCH_NAME, False):
        enrollment = CourseEnrollmentFactory()
        with self.assertRaises(Schedule.DoesNotExist):
            enrollment.schedule
