mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
also cover unregistering
This commit is contained in:
parent
08e278232b
commit
a357c4ef88
@ -29,6 +29,11 @@ class ScheduledTaskPluginTests(TestCase):
|
|||||||
scheduled_plugin_tasks = Schedule.objects.filter(name__istartswith="plugin.")
|
scheduled_plugin_tasks = Schedule.objects.filter(name__istartswith="plugin.")
|
||||||
self.assertEqual(len(scheduled_plugin_tasks), 3)
|
self.assertEqual(len(scheduled_plugin_tasks), 3)
|
||||||
|
|
||||||
|
# test unregistering
|
||||||
|
plg.unregister_tasks()
|
||||||
|
scheduled_plugin_tasks = Schedule.objects.filter(name__istartswith="plugin.")
|
||||||
|
self.assertEqual(len(scheduled_plugin_tasks), 0)
|
||||||
|
|
||||||
def test_calling(self):
|
def test_calling(self):
|
||||||
"""check if a function can be called without errors"""
|
"""check if a function can be called without errors"""
|
||||||
self.assertEqual(call_function('schedule', 'member_func'), False)
|
self.assertEqual(call_function('schedule', 'member_func'), False)
|
||||||
|
Loading…
Reference in New Issue
Block a user