Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(12)  |  Call(12)  |  Derive(0)  |  Import(0)

src/d/j/django-background-task-HEAD/background_task/tests.py   django-background-task(Download)
        set_result(1)
 
        all_tasks = Task.objects.all()
        self.assertEqual(1, all_tasks.count())
        task = all_tasks[0]
        reschedule_fn(schedule=90)
 
        all_tasks = Task.objects.all()
        self.assertEqual(1, all_tasks.count())
        task = all_tasks[0]
        check_fn(schedule=90)
 
        all_tasks = Task.objects.all()
        self.assertEqual(1, all_tasks.count())
        task = all_tasks[0]
    def test_run_next_task_error_handling(self):
        self.throws_error()
 
        all_tasks = Task.objects.all()
        self.assertEqual(1, all_tasks.count())
        self.failUnless(tasks.run_next_task())
 
        all_tasks = Task.objects.all()
        self.assertEqual(1, all_tasks.count())