示例#1
0
 def test_use_interval_start(self):
     interval = None
     interval_start = luigi.DateParameter().parse('2013-01-01')
     CourseEnrollmentTask(interval=interval,
                          interval_start=interval_start,
                          output_root="/fake/output",
                          overwrite_n_days=5)
示例#2
0
 def create_enrollment_task(self, interval='2013-01-01'):
     """Create a task for testing purposes."""
     fake_param = luigi.DateIntervalParameter()
     self.task = CourseEnrollmentTask(
         interval=fake_param.parse(interval),
         output_root="/fake/output",
         overwrite_n_days=5,
     )
示例#3
0
 def test_missing_interval(self):
     interval = None
     interval_start = None
     with self.assertRaises(luigi.parameter.MissingParameterException):
         CourseEnrollmentTask(interval=interval,
                              interval_start=interval_start,
                              output_root="/fake/output",
                              overwrite_n_days=5)