From 1f59373c7052cdb8ddb4ba73e18ccd4a5f1e5719 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 13 Feb 2022 05:50:53 +0100 Subject: [PATCH] test wrong setting defaults --- InvenTree/common/tests.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/InvenTree/common/tests.py b/InvenTree/common/tests.py index c82ca41f38..f81f21d1f8 100644 --- a/InvenTree/common/tests.py +++ b/InvenTree/common/tests.py @@ -74,6 +74,22 @@ class SettingsTest(TestCase): Populate the settings with default values """ + # Add wrong settings + InvenTreeSetting.SETTINGS.update({ + 'WRONG_BOOL_EMPTY': { + 'name': 'Barcode Support', + 'description': 'Enable barcode scanner support', + 'default': '', + 'validator': bool, + }, + 'WRONG_BOOL_DEFAULT': { + 'name': 'Barcode Support', + 'description': 'Enable barcode scanner support', + 'default': 12, + 'validator': bool, + } + }) + for key in InvenTreeSetting.SETTINGS.keys(): value = InvenTreeSetting.get_setting_default(key)