adjust testing function to also check return

This commit is contained in:
Matthias 2022-05-03 21:59:17 +02:00
parent 70b108d813
commit 7c437a3cf2
No known key found for this signature in database
GPG Key ID: AB6D0E6C4CB65093
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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)