This commit is contained in:
Matthias Mair 2022-05-20 12:33:51 +02:00
parent 42d325e7ca
commit e8287f02d4
14 changed files with 31 additions and 31 deletions

View File

@ -6,10 +6,10 @@ only used for testing the js files! - This file is omited from coverage
import os # pragma: no cover
import pathlib
from InvenTree.InvenTree.helpers import InvenTreeTestCate # pragma: no cover
from InvenTree.InvenTree.helpers import InvenTreeTestCase # pragma: no cover
class RenderJavascriptFiles(InvenTreeTestCate): # pragma: no cover
class RenderJavascriptFiles(InvenTreeTestCase): # pragma: no cover
"""
A unit test to "render" javascript files.

View File

@ -785,5 +785,5 @@ def inheritors(cls):
return subcls
class InvenTreeTestCate(UserMixin, TestCase):
class InvenTreeTestCase(UserMixin, TestCase):
pass

View File

@ -3,7 +3,7 @@
from rest_framework import status
from django.urls import reverse
from InvenTree.InvenTree.helpers import InvenTreeTestCate
from InvenTree.InvenTree.helpers import InvenTreeTestCase
from InvenTree.api_tester import InvenTreeAPITestCase
@ -12,7 +12,7 @@ from users.models import RuleSet
from base64 import b64encode
class HTMLAPITests(InvenTreeTestCate):
class HTMLAPITests(InvenTreeTestCase):
"""
Test that we can access the REST API endpoints via the HTML interface.

View File

@ -2,10 +2,10 @@
from django.urls import reverse
from InvenTree.InvenTree.helpers import InvenTreeTestCate
from InvenTree.InvenTree.helpers import InvenTreeTestCase
class MiddlewareTests(InvenTreeTestCate):
class MiddlewareTests(InvenTreeTestCase):
"""Test for middleware functions"""
def check_path(self, url, code=200, **kwargs):

View File

@ -7,10 +7,10 @@ import os
from django.urls import reverse
from InvenTree.InvenTree.helpers import InvenTreeTestCate
from InvenTree.InvenTree.helpers import InvenTreeTestCase
class ViewTests(InvenTreeTestCate):
class ViewTests(InvenTreeTestCase):
""" Tests for various top-level views """
username = 'test_user'

View File

@ -456,7 +456,7 @@ class TestStatus(TestCase):
self.assertEqual(ready.isImportingData(), False)
class TestSettings(helpers.InvenTreeTestCate):
class TestSettings(helpers.InvenTreeTestCase):
"""
Unit tests for settings
"""
@ -567,7 +567,7 @@ class TestSettings(helpers.InvenTreeTestCate):
self.assertEqual(config.get_setting(TEST_ENV_NAME, None), '321')
class TestInstanceName(helpers.InvenTreeTestCate):
class TestInstanceName(helpers.InvenTreeTestCase):
"""
Unit tests for instance name
"""

View File

@ -2,7 +2,7 @@ from django.urls import reverse
from datetime import datetime, timedelta
from InvenTree.InvenTree.helpers import InvenTreeTestCate
from InvenTree.InvenTree.helpers import InvenTreeTestCase
from .models import Build
from stock.models import StockItem
@ -10,7 +10,7 @@ from stock.models import StockItem
from InvenTree.status_codes import BuildStatus
class BuildTestSimple(InvenTreeTestCate):
class BuildTestSimple(InvenTreeTestCase):
fixtures = [
'category',
@ -88,7 +88,7 @@ class BuildTestSimple(InvenTreeTestCate):
self.assertEqual(build.status, BuildStatus.CANCELLED)
class TestBuildViews(InvenTreeTestCate):
class TestBuildViews(InvenTreeTestCase):
""" Tests for Build app views """
fixtures = [

View File

@ -7,7 +7,7 @@ from django.test import TestCase, Client
from django.urls import reverse
from InvenTree.api_tester import InvenTreeAPITestCase
from InvenTree.helpers import InvenTreeTestCate, str2bool
from InvenTree.helpers import InvenTreeTestCase, str2bool
from plugin.models import NotificationUserSetting, PluginConfig
from plugin import registry
@ -17,7 +17,7 @@ from .api import WebhookView
CONTENT_TYPE_JSON = 'application/json'
class SettingsTest(InvenTreeTestCate):
class SettingsTest(InvenTreeTestCase):
"""
Tests for the 'settings' model
"""

View File

@ -2,10 +2,10 @@
from django.urls import reverse
from InvenTree.InvenTree.helpers import InvenTreeTestCate
from InvenTree.InvenTree.helpers import InvenTreeTestCase
class CompanyViewTestBase(InvenTreeTestCate):
class CompanyViewTestBase(InvenTreeTestCase):
fixtures = [
'category',

View File

@ -6,10 +6,10 @@ import csv
from django.urls import reverse
from InvenTree.InvenTree.helpers import InvenTreeTestCate
from InvenTree.InvenTree.helpers import InvenTreeTestCase
class BomExportTest(InvenTreeTestCate):
class BomExportTest(InvenTreeTestCase):
fixtures = [
'category',

View File

@ -9,7 +9,7 @@ from django.core.exceptions import ValidationError
import os
from InvenTree.InvenTree.helpers import InvenTreeTestCate
from InvenTree.InvenTree.helpers import InvenTreeTestCase
from .models import Part, PartCategory, PartCategoryStar, PartStar, PartTestTemplate
from .models import rename_part_image
@ -22,7 +22,7 @@ from common.models import InvenTreeSetting, InvenTreeUserSetting, NotificationEn
from common.notifications import storage, UIMessageNotification
class TemplateTagTest(InvenTreeTestCate):
class TemplateTagTest(InvenTreeTestCase):
""" Tests for the custom template tag code """
def test_define(self):
@ -325,7 +325,7 @@ class TestTemplateTest(TestCase):
self.assertEqual(variant.getTestTemplates().count(), n + 1)
class PartSettingsTest(InvenTreeTestCate):
class PartSettingsTest(InvenTreeTestCase):
"""
Tests to ensure that the user-configurable default values work as expected.
@ -445,7 +445,7 @@ class PartSettingsTest(InvenTreeTestCate):
Part.objects.create(name='abc', revision='6', description='A part', IPN=' ')
class PartSubscriptionTests(InvenTreeTestCate):
class PartSubscriptionTests(InvenTreeTestCase):
fixtures = [
'location',
@ -554,7 +554,7 @@ class PartSubscriptionTests(InvenTreeTestCate):
self.assertTrue(self.part.is_starred_by(self.user))
class BaseNotificationIntegrationTest(InvenTreeTestCate):
class BaseNotificationIntegrationTest(InvenTreeTestCase):
""" Integration test for notifications """
fixtures = [

View File

@ -2,12 +2,12 @@
from django.urls import reverse
from InvenTree.InvenTree.helpers import InvenTreeTestCate
from InvenTree.InvenTree.helpers import InvenTreeTestCase
# from common.models import InvenTreeSetting
class StockViewTestCase(InvenTreeTestCate):
class StockViewTestCase(InvenTreeTestCase):
fixtures = [
'category',

View File

@ -2,7 +2,7 @@ from django.db.models import Sum
from django.core.exceptions import ValidationError
import datetime
from InvenTree.InvenTree.helpers import InvenTreeTestCate
from InvenTree.InvenTree.helpers import InvenTreeTestCase
from InvenTree.status_codes import StockHistoryCode
@ -13,7 +13,7 @@ from part.models import Part
from build.models import Build
class StockTest(InvenTreeTestCate):
class StockTest(InvenTreeTestCase):
"""
Tests to ensure that the stock location tree functions correcly
"""

View File

@ -4,7 +4,7 @@ from django.urls import reverse
from django.contrib.auth.models import Group
from rest_framework.authtoken.models import Token
from InvenTree.InvenTree.helpers import InvenTreeTestCate
from InvenTree.InvenTree.helpers import InvenTreeTestCase
from users.models import RuleSet, Owner
@ -160,7 +160,7 @@ class RuleSetModelTest(TestCase):
self.assertEqual(group.permissions.count(), 0)
class OwnerModelTest(InvenTreeTestCate):
class OwnerModelTest(InvenTreeTestCase):
"""
Some simplistic tests to ensure the Owner model is setup correctly.
"""