From 70b108d81305a261dd657735b53eed3886f6d01c Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 3 May 2022 21:56:58 +0200 Subject: [PATCH] add check for call function --- InvenTree/plugin/samples/integration/test_scheduled_task.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/InvenTree/plugin/samples/integration/test_scheduled_task.py b/InvenTree/plugin/samples/integration/test_scheduled_task.py index 4df357df29..a43356c36d 100644 --- a/InvenTree/plugin/samples/integration/test_scheduled_task.py +++ b/InvenTree/plugin/samples/integration/test_scheduled_task.py @@ -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')