예제 #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
        )
예제 #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)
예제 #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)
예제 #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)
예제 #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)