test wrong setting defaults

This commit is contained in:
Matthias 2022-02-13 05:50:53 +01:00
parent 42b4466897
commit 1f59373c70
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -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)