Example #1
0
 def test_enrollment_end(self, experiment_end, enrollment_created, expected_bucket):
     if enrollment_created:
         enrollment = CourseEnrollmentFactory(user=self.user, course_id='a/b/c')
         enrollment.created = parser.parse(enrollment_created).replace(tzinfo=pytz.UTC)
         enrollment.save()
     if experiment_end:
         ExperimentKeyValueFactory(experiment_id=0, key='enrollment_end', value=experiment_end)
     self.assertEqual(self.get_bucket(), expected_bucket)