mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
test that a save() action on a plugin is reloading
This commit is contained in:
parent
baca0dc268
commit
4397f57acc
@ -139,7 +139,15 @@ class PluginDetailAPITest(InvenTreeAPITestCase):
|
|||||||
registry.reload_plugins()
|
registry.reload_plugins()
|
||||||
fixtures = PluginConfig.objects.all()
|
fixtures = PluginConfig.objects.all()
|
||||||
|
|
||||||
|
# check mixin registry
|
||||||
plg = fixtures.first()
|
plg = fixtures.first()
|
||||||
mixin_dict = plg.mixins()
|
mixin_dict = plg.mixins()
|
||||||
self.assertIn('base', mixin_dict)
|
self.assertIn('base', mixin_dict)
|
||||||
self.assertDictContainsSubset({'base':{'key':'base', 'human_name':'base'}}, mixin_dict)
|
self.assertDictContainsSubset({'base':{'key':'base', 'human_name':'base'}}, mixin_dict)
|
||||||
|
|
||||||
|
# check reload on save
|
||||||
|
with self.assertWarns('A reload was triggered'):
|
||||||
|
plg_inactive = fixtures.filter(active=False).first()
|
||||||
|
plg_inactive.active = True
|
||||||
|
plg_inactive.save()
|
||||||
|
print('done')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user