remove theme test

This commit is contained in:
Matthias 2022-03-12 01:50:05 +01:00
parent 1e164fea5b
commit 92279b2f8f
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

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