add check for call function

This commit is contained in:
Matthias 2022-05-03 21:56:58 +02:00
parent 5ea6a325ee
commit 70b108d813
No known key found for this signature in database
GPG Key ID: AB6D0E6C4CB65093

View File

@ -3,6 +3,7 @@
from django.test import TestCase from django.test import TestCase
from plugin import registry from plugin import registry
from plugin.registry import call_function
class ScheduledTaskPluginTests(TestCase): class ScheduledTaskPluginTests(TestCase):
@ -27,3 +28,7 @@ class ScheduledTaskPluginTests(TestCase):
from django_q.models import Schedule from django_q.models import Schedule
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)
def test_calling(self):
"""check if a function can be called without errors"""
call_function('schedule', 'member_func')