add test for as_choice

This commit is contained in:
Matthias 2022-03-12 03:19:00 +01:00
parent d8c20894ce
commit e8ec0dc46b
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -73,6 +73,10 @@ class SettingsTest(TestCase):
self.assertEqual(instance_obj.get_setting_units(instance_ref), '')
self.assertEqual(instance_obj.get_setting_units(stale_ref), 'days')
# check as_choice
self.assertEqual(instance_obj.as_choice(), 'My very first InvenTree Instance')
self.assertEqual(report_size_obj.as_choice(), 'A4')
# check is_choice
self.assertEqual(instance_obj.is_choice(), False)
self.assertEqual(report_size_obj.is_choice(), True)