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:
@ -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):
|
||||
|
@ -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"""
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user