Merge pull request #3040 from matmair/test-simplify

Test simplify
This commit is contained in:
Oliver authored and GitHub committed 2022-05-21 19:41:23 +10:00
commit 8eaf172512
25 files changed
+162 -499

No files matched your search

+2 -13
View File
@@ -4,11 +4,10 @@ import json
from datetime import timedelta
from django.test import TestCase, Client
from django.contrib.auth import get_user_model
from django.urls import reverse
from InvenTree.api_tester import InvenTreeAPITestCase
from InvenTree.helpers import str2bool
from InvenTree.helpers import InvenTreeTestCase, str2bool
from plugin.models import NotificationUserSetting, PluginConfig
from plugin import registry
@@ -18,7 +17,7 @@ from .api import WebhookView
CONTENT_TYPE_JSON = 'application/json'
class SettingsTest(TestCase):
class SettingsTest(InvenTreeTestCase):
"""
Tests for the 'settings' model
"""
@@ -27,16 +26,6 @@ class SettingsTest(TestCase):
'settings',
]
def setUp(self):
user = get_user_model()
self.user = user.objects.create_user('username', 'user@email.com', 'password')
self.user.is_staff = True
self.user.save()
self.client.login(username='username', password='password')
def test_settings_objects(self):
# There should be two settings objects in the database