2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 04:55:44 +00:00

Cleanup / consolidate unit testing code (#4831)

- Move testing code out of helpers.py
- Create new file unit_test.py
This commit is contained in:
Oliver
2023-05-17 07:35:26 +10:00
committed by GitHub
parent f85b378115
commit 4785f465e8
43 changed files with 138 additions and 139 deletions

View File

@ -3,7 +3,7 @@
from django.contrib.auth.models import Group, User
from django.urls import reverse
from InvenTree.api_tester import InvenTreeAPITestCase
from InvenTree.unit_test import InvenTreeAPITestCase
class UserAPITests(InvenTreeAPITestCase):

View File

@ -2,14 +2,14 @@
from django_test_migrations.contrib.unittest_case import MigratorTestCase
from InvenTree import helpers
from InvenTree import unit_test
class TestForwardMigrations(MigratorTestCase):
"""Test entire schema migration sequence for the users app."""
migrate_from = ('users', helpers.getOldestMigrationFile('users'))
migrate_to = ('users', helpers.getNewestMigrationFile('users'))
migrate_from = ('users', unit_test.getOldestMigrationFile('users'))
migrate_to = ('users', unit_test.getNewestMigrationFile('users'))
def prepare(self):
"""Setup the initial state of the database before migrations"""

View File

@ -7,7 +7,7 @@ from django.urls import reverse
from rest_framework.authtoken.models import Token
from InvenTree.helpers import InvenTreeTestCase
from InvenTree.unit_test import InvenTreeTestCase
from users.models import Owner, RuleSet