mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
test plugin file helper
This commit is contained in:
parent
646107fee0
commit
2c22ce9f0d
@ -17,7 +17,7 @@ from . import helpers
|
||||
from . import version
|
||||
from . import status
|
||||
from . import ready
|
||||
from .config import get_config_file
|
||||
from .config import get_config_file, get_plugin_file
|
||||
|
||||
from decimal import Decimal
|
||||
|
||||
@ -463,3 +463,14 @@ class TestSettings(TestCase):
|
||||
with self.env:
|
||||
self.env.set('INVENTREE_CONFIG_FILE', 'my_special_conf.yaml')
|
||||
self.assertIn('InvenTree/InvenTree/my_special_conf.yaml', get_config_file())
|
||||
|
||||
def test_helpers_plugin_file(self):
|
||||
# normal run - not configured
|
||||
self.assertIn('InvenTree/InvenTree/plugins.txt', get_plugin_file())
|
||||
|
||||
# with env set
|
||||
with self.env:
|
||||
self.env.set('INVENTREE_PLUGIN_FILE', 'my_special_plugins.txt')
|
||||
self.assertIn('my_special_plugins.txt', get_plugin_file())
|
||||
|
||||
self.assertIn('InvenTree/InvenTree/plugins.txt', get_plugin_file())
|
||||
|
Loading…
Reference in New Issue
Block a user