mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-03 05:48:47 +00:00
add test for cfg file helper
This commit is contained in:
parent
af95779ed0
commit
1c7f37e52a
@ -17,6 +17,7 @@ from . import helpers
|
|||||||
from . import version
|
from . import version
|
||||||
from . import status
|
from . import status
|
||||||
from . import ready
|
from . import ready
|
||||||
|
from .config import get_config_file
|
||||||
|
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
|
|
||||||
@ -453,3 +454,12 @@ class TestSettings(TestCase):
|
|||||||
|
|
||||||
# make sure to clean up
|
# make sure to clean up
|
||||||
settings.TESTING_ENV = False
|
settings.TESTING_ENV = False
|
||||||
|
|
||||||
|
def test_helpers_cfg_file(self):
|
||||||
|
# normal run - not configured
|
||||||
|
self.assertIn('InvenTree/InvenTree/config.yaml', get_config_file())
|
||||||
|
|
||||||
|
# with env set
|
||||||
|
with self.env:
|
||||||
|
self.env.set('INVENTREE_CONFIG_FILE', 'my_special_conf.yaml')
|
||||||
|
self.assertIn('InvenTree/InvenTree/my_special_conf.yaml', get_config_file())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user