Example #1
0
    def test_atschedule_schedules_batches(self, _, create_batches, schedule_batches):
        atschedule(*self.test_args, email='*****@*****.**', parallel=5, interval=10)
        batches, at = create_batches.return_value

        schedule_batches.assert_called_once_with(
            self.command, batches, at, '*****@*****.**', 5
        )
Example #2
0
    def test_atschedule_returns_results_of_scheduled_batches(self, _1, _2, schedule_batches):
        ret = atschedule(*self.test_args, email='*****@*****.**', parallel=5, interval=10)

        self.assertEqual(ret, schedule_batches.return_value)
Example #3
0
 def test_atschedule_defaults_to_interval_is_0(self, check_parameters, *args):
     atschedule(*self.test_args, parallel=5)
     
     check_parameters.assert_called_once_with(parallel=5, interval=0)
Example #4
0
    def test_atschedule_create_batches(self, _, create_batches, *args):
        atschedule(*self.test_args, parallel=5, interval=10)

        create_batches.assert_called_once_with('echo {0}', [1, 2, 3], '15:00', 5, 10)
Example #5
0
    def test_atschedule_checks_parameters(self, check_parameters, *args):
        atschedule(*self.test_args, parallel=5, interval=10)

        check_parameters.assert_called_once_with(parallel=5, interval=10)