test allValues

This commit is contained in:
Matthias 2022-03-12 00:27:37 +01:00
parent e955b75041
commit e05ebce058
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -46,6 +46,19 @@ class SettingsTest(TestCase):
# Check object lookup (case insensitive)
self.assertEqual(InvenTreeSetting.get_setting_object('iNvEnTrEE_inSTanCE').pk, 1)
def test_allValues(self):
"""
Make sure that the allValues functions returns correctly
"""
# define testing settings
# check a few keys
result = InvenTreeSetting.allValues()
self.assertIn('INVENTREE_INSTANCE', result)
self.assertIn('PART_COPY_TESTS', result)
self.assertIn('STOCK_OWNERSHIP_CONTROL', result)
self.assertIn('SIGNUP_GROUP', result)
def test_required_values(self):
"""
- Ensure that every global setting has a name.