diff --git a/tests/apps/core/test_background_jobs.py b/tests/apps/core/test_background_jobs.py index ced7066..756c4d9 100644 --- a/tests/apps/core/test_background_jobs.py +++ b/tests/apps/core/test_background_jobs.py @@ -1,11 +1,9 @@ """Тесты для BackgroundJob.""" -from django.test import TestCase - -from faker import Faker - from apps.core.models import BackgroundJob, JobStatus from apps.core.services import BackgroundJobService +from django.test import TestCase +from faker import Faker fake = Faker() diff --git a/tests/apps/core/test_services.py b/tests/apps/core/test_services.py index 4c41ae2..e7b2c2e 100644 --- a/tests/apps/core/test_services.py +++ b/tests/apps/core/test_services.py @@ -1,10 +1,9 @@ """Tests for core services""" -from django.contrib.auth import get_user_model -from django.test import TestCase - from apps.core.exceptions import NotFoundError from apps.core.services import BaseService +from django.contrib.auth import get_user_model +from django.test import TestCase User = get_user_model() diff --git a/tests/apps/core/test_signals.py b/tests/apps/core/test_signals.py index ad1dfa0..4444401 100644 --- a/tests/apps/core/test_signals.py +++ b/tests/apps/core/test_signals.py @@ -1,12 +1,6 @@ """Tests for core signals utilities""" -from django.contrib.auth import get_user_model -from django.db.models.signals import post_save, pre_save -from django.test import TestCase - -from tests.apps.user.factories import UserFactory - from apps.core.signals import ( SignalDispatcher, emit_password_changed, @@ -18,6 +12,11 @@ from apps.core.signals import ( user_registered, user_verified, ) +from django.contrib.auth import get_user_model +from django.db.models.signals import post_save, pre_save +from django.test import TestCase + +from tests.apps.user.factories import UserFactory User = get_user_model() diff --git a/tests/apps/parsers/test_clients.py b/tests/apps/parsers/test_clients.py index f1452b5..30bc53e 100644 --- a/tests/apps/parsers/test_clients.py +++ b/tests/apps/parsers/test_clients.py @@ -3,17 +3,15 @@ from io import BytesIO from unittest.mock import patch -from django.test import TestCase, tag - -from faker import Faker -from openpyxl import Workbook - from apps.parsers.clients.base import BaseHTTPClient, HTTPClientError from apps.parsers.clients.minpromtorg.industrial import IndustrialProductionClient from apps.parsers.clients.minpromtorg.manufactures import ManufacturesClient from apps.parsers.clients.minpromtorg.schemas import IndustrialCertificate, Manufacturer from apps.parsers.clients.proverki import ProverkiClient from apps.parsers.clients.proverki.schemas import Inspection +from django.test import TestCase, tag +from faker import Faker +from openpyxl import Workbook fake = Faker("ru_RU") diff --git a/tests/apps/parsers/test_services.py b/tests/apps/parsers/test_services.py index 1d84c1f..a12d7a1 100644 --- a/tests/apps/parsers/test_services.py +++ b/tests/apps/parsers/test_services.py @@ -1,9 +1,5 @@ """Tests for parsers services.""" -from django.test import TestCase - -from faker import Faker - from apps.parsers.clients.minpromtorg.schemas import IndustrialCertificate, Manufacturer from apps.parsers.clients.proverki.schemas import Inspection from apps.parsers.models import ( @@ -20,6 +16,8 @@ from apps.parsers.services import ( ParserLoadLogService, ProxyService, ) +from django.test import TestCase +from faker import Faker from .factories import ( IndustrialCertificateRecordFactory, @@ -587,10 +585,9 @@ class InspectionServiceTest(TestCase): self.assertEqual(record.load_batch, 1) # Original batch -from django.test import tag - from apps.parsers.clients.base import HTTPClientError from apps.parsers.clients.minpromtorg.industrial import IndustrialProductionClient +from django.test import tag @tag("integration", "slow", "network", "e2e")