mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
skip tests if no themes are present
This commit is contained in:
parent
c0ef12f270
commit
5ab4fdeb84
@ -682,9 +682,19 @@ class ColorThemeTest(TestCase):
|
||||
def test_choices(self):
|
||||
result = ColorTheme.get_color_themes_choices()
|
||||
|
||||
# skip if no themes present
|
||||
if not result:
|
||||
return
|
||||
|
||||
self.assertIn(('default', 'Default'), result)
|
||||
|
||||
def test_valid_choice(self):
|
||||
result = ColorTheme.get_color_themes_choices()
|
||||
|
||||
# skip if no themes present
|
||||
if not result:
|
||||
return
|
||||
|
||||
# check wrong reference
|
||||
self.assertFalse(ColorTheme.is_valid_choice('abcdd'))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user