mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
remove theme test
This commit is contained in:
parent
1e164fea5b
commit
92279b2f8f
@ -9,7 +9,7 @@ from django.contrib.auth import get_user_model
|
||||
from django.urls import reverse
|
||||
|
||||
from InvenTree.api_tester import InvenTreeAPITestCase
|
||||
from .models import InvenTreeSetting, WebhookEndpoint, WebhookMessage, NotificationEntry, ColorTheme
|
||||
from .models import InvenTreeSetting, WebhookEndpoint, WebhookMessage, NotificationEntry
|
||||
from .api import WebhookView
|
||||
|
||||
CONTENT_TYPE_JSON = 'application/json'
|
||||
@ -309,26 +309,3 @@ class LoadingTest(TestCase):
|
||||
|
||||
# now it should be false again
|
||||
self.assertFalse(common.models.InvenTreeSetting.get_setting('SERVER_RESTART_REQUIRED'))
|
||||
|
||||
|
||||
class ColorThemeTest(TestCase):
|
||||
"""
|
||||
Tests for ColorTheme
|
||||
"""
|
||||
|
||||
def test_choices(self):
|
||||
result = ColorTheme.get_color_themes_choices()
|
||||
|
||||
self.assertIn(('default', 'Default'), result)
|
||||
|
||||
def test_valid_choice(self):
|
||||
# check wrong reference
|
||||
self.assertFalse(ColorTheme.is_valid_choice('abcdd'))
|
||||
|
||||
# create themes
|
||||
aa = ColorTheme.objects.create(user='aa', name='testname')
|
||||
ab = ColorTheme.objects.create(user='ab', name='darker')
|
||||
|
||||
# check valid theme
|
||||
self.assertFalse(ColorTheme.is_valid_choice(aa))
|
||||
self.assertTrue(ColorTheme.is_valid_choice(ab))
|
||||
|
Loading…
Reference in New Issue
Block a user