diff --git a/InvenTree/InvenTree/test_tasks.py b/InvenTree/InvenTree/test_tasks.py index e9c9d9f01c..c00931b237 100644 --- a/InvenTree/InvenTree/test_tasks.py +++ b/InvenTree/InvenTree/test_tasks.py @@ -41,3 +41,22 @@ class ScheduledTaskTests(TestCase): # But the 'minutes' should have been updated t = Schedule.objects.get(func=task) self.assertEqual(t.minutes, 5) + +class InvenTreeTaskTests(TestCase): + """Unit tests for tasks""" + + def test_task_hearbeat(self, name): + """Test the task heartbeat""" + InvenTree.tasks.offload_task(InvenTree.tasks.heartbeat) + + def test_task_delete_successful_tasks(self, name): + """Test the task delete_successful_tasks""" + InvenTree.tasks.offload_task(InvenTree.tasks.delete_successful_tasks) + + def test_task_delete_old_error_logs(self, name): + """Test the task delete_old_error_logs""" + InvenTree.tasks.offload_task(InvenTree.tasks.delete_old_error_logs) + + def test_task_check_for_updates(self, name): + """Test the task check_for_updates""" + InvenTree.tasks.offload_task(InvenTree.tasks.check_for_updates)