mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +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()
|
||||
fixtures = PluginConfig.objects.all()
|
||||
|
||||
# check mixin registry
|
||||
plg = fixtures.first()
|
||||
mixin_dict = plg.mixins()
|
||||
self.assertIn('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…
Reference in New Issue
Block a user