mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 12:35:46 +00:00
Task improvements (#5159)
* Ignore triggered events if plugin events are not enabled * Ensure that plugin tasks are handled by the background worker * Allow shell access * Don't force async if testing * Enable plugin events as part of CI * fix
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
from django.conf import settings
|
||||
from django.test import TestCase
|
||||
|
||||
from common.models import InvenTreeSetting
|
||||
from plugin import InvenTreePlugin, registry
|
||||
from plugin.base.event.events import trigger_event
|
||||
from plugin.helpers import MixinNotImplementedError
|
||||
@ -21,6 +22,8 @@ class EventPluginSampleTests(TestCase):
|
||||
config.active = True
|
||||
config.save()
|
||||
|
||||
InvenTreeSetting.set_setting('ENABLE_PLUGINS_EVENTS', True, change_user=None)
|
||||
|
||||
# Enable event testing
|
||||
settings.PLUGIN_TESTING_EVENTS = True
|
||||
# Check that an event is issued
|
||||
|
Reference in New Issue
Block a user