2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-14 02:55:41 +00:00

add check for call function

This commit is contained in:
Matthias
2022-05-03 21:56:58 +02:00
parent 5ea6a325ee
commit 70b108d813

View File

@ -3,6 +3,7 @@
from django.test import TestCase
from plugin import registry
from plugin.registry import call_function
class ScheduledTaskPluginTests(TestCase):
@ -27,3 +28,7 @@ class ScheduledTaskPluginTests(TestCase):
from django_q.models import Schedule
scheduled_plugin_tasks = Schedule.objects.filter(name__istartswith="plugin.")
self.assertEqual(len(scheduled_plugin_tasks), 3)
def test_calling(self):
"""check if a function can be called without errors"""
call_function('schedule', 'member_func')