mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
adjust testing function to also check return
This commit is contained in:
parent
70b108d813
commit
7c437a3cf2
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user