mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-22 07:55:07 +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:
1 parent
4c3dc6ddbd
commit
7ba26ebfbb
2 files changed
+19
-1
No files matched your search
@@ -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