diff --git a/InvenTree/plugin/samples/integration/scheduled_task.py b/InvenTree/plugin/samples/integration/scheduled_task.py index 579ad4effe..635bdfe90d 100644 --- a/InvenTree/plugin/samples/integration/scheduled_task.py +++ b/InvenTree/plugin/samples/integration/scheduled_task.py @@ -58,3 +58,4 @@ class ScheduledTaskPlugin(ScheduleMixin, SettingsMixin, IntegrationPluginBase): t_or_f = self.get_setting('T_OR_F') print(f"Called member_func - value is {t_or_f}") + return t_or_f diff --git a/InvenTree/plugin/samples/integration/test_scheduled_task.py b/InvenTree/plugin/samples/integration/test_scheduled_task.py index a43356c36d..4d41eea7c5 100644 --- a/InvenTree/plugin/samples/integration/test_scheduled_task.py +++ b/InvenTree/plugin/samples/integration/test_scheduled_task.py @@ -17,7 +17,7 @@ class ScheduledTaskPluginTests(TestCase): self.assertTrue(plg) # check that the built-in function is running - plg.member_func() + self.assertEqual(plg.member_func(), False) # check that the tasks are defined self.assertEqual(plg.get_task_names(), ['plugin.schedule.member', 'plugin.schedule.hello', 'plugin.schedule.world']) @@ -31,4 +31,4 @@ class ScheduledTaskPluginTests(TestCase): def test_calling(self): """check if a function can be called without errors""" - call_function('schedule', 'member_func') + self.assertEqual(call_function('schedule', 'member_func'), False)