Fix Ruff import ordering for CI
Some checks failed
CI/CD Pipeline / Code Quality Checks (push) Successful in 1m53s
CI/CD Pipeline / Run Tests (push) Successful in 2m19s
CI/CD Pipeline / Build Docker Images (push) Successful in 3m26s
CI/CD Pipeline / Push to Gitea Registry (push) Failing after 20s
CI/CD Pipeline / Deploy to Server (push) Has been skipped
Some checks failed
CI/CD Pipeline / Code Quality Checks (push) Successful in 1m53s
CI/CD Pipeline / Run Tests (push) Successful in 2m19s
CI/CD Pipeline / Build Docker Images (push) Successful in 3m26s
CI/CD Pipeline / Push to Gitea Registry (push) Failing after 20s
CI/CD Pipeline / Deploy to Server (push) Has been skipped
This commit is contained in:
@@ -1,10 +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()
|
||||
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
"""Тесты для BulkOperationsMixin и QueryOptimizerMixin."""
|
||||
|
||||
from django.test import TestCase
|
||||
from faker import Faker
|
||||
|
||||
from apps.core.models import BackgroundJob
|
||||
from apps.core.services import (
|
||||
BulkOperationsMixin,
|
||||
QueryOptimizerMixin,
|
||||
)
|
||||
from django.test import TestCase
|
||||
from faker import Faker
|
||||
|
||||
fake = Faker()
|
||||
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
"""Tests for core cache utilities"""
|
||||
|
||||
from django.core.cache import cache
|
||||
from django.test import TestCase
|
||||
|
||||
from apps.core.cache import (
|
||||
CacheManager,
|
||||
_build_cache_key,
|
||||
cache_method,
|
||||
cache_result,
|
||||
)
|
||||
from django.core.cache import cache
|
||||
from django.test import TestCase
|
||||
|
||||
|
||||
class CacheResultDecoratorTest(TestCase):
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
from apps.core.excel import (
|
||||
BaseExcelParser,
|
||||
ColumnMapping,
|
||||
@@ -16,6 +14,7 @@ from apps.core.excel import (
|
||||
validate_ogrn,
|
||||
validate_okpo,
|
||||
)
|
||||
from django.test import TestCase
|
||||
|
||||
|
||||
class ValidatorsTest(TestCase):
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Tests for core exceptions and exception handler"""
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
from apps.core.exceptions import (
|
||||
AuthenticationError,
|
||||
BadRequestError,
|
||||
@@ -18,6 +16,7 @@ from apps.core.exceptions import (
|
||||
ServiceUnavailableError,
|
||||
ValidationError,
|
||||
)
|
||||
from django.test import TestCase
|
||||
|
||||
|
||||
class BaseAPIExceptionTest(TestCase):
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
"""Tests for core filter utilities"""
|
||||
|
||||
from django.test import TestCase
|
||||
from django_filters import rest_framework as filters
|
||||
from rest_framework.filters import OrderingFilter, SearchFilter
|
||||
|
||||
from apps.core.filters import (
|
||||
BaseFilterSet,
|
||||
FilterMixin,
|
||||
@@ -11,6 +7,9 @@ from apps.core.filters import (
|
||||
StandardSearchFilter,
|
||||
get_filter_backends,
|
||||
)
|
||||
from django.test import TestCase
|
||||
from django_filters import rest_framework as filters
|
||||
from rest_framework.filters import OrderingFilter, SearchFilter
|
||||
|
||||
|
||||
class BaseFilterSetTest(TestCase):
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
|
||||
from io import StringIO
|
||||
|
||||
from django.core.management import call_command
|
||||
from django.test import TestCase
|
||||
|
||||
from apps.external_data.models import (
|
||||
ArbitrationCase,
|
||||
IndustrialProduct,
|
||||
@@ -19,6 +16,8 @@ from apps.form_5.models import FormF5Record
|
||||
from apps.form_6.models import FormF6Record
|
||||
from apps.organization.models import Organization
|
||||
from apps.registers.models import RegisterUpload, RegistryMembershipPeriod
|
||||
from django.core.management import call_command
|
||||
from django.test import TestCase
|
||||
|
||||
|
||||
class GenerateTestReportsCommandTest(TestCase):
|
||||
|
||||
@@ -4,13 +4,12 @@ import json
|
||||
import logging
|
||||
from io import StringIO
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
from apps.core.logging import (
|
||||
ContextLogger,
|
||||
JSONFormatter,
|
||||
get_json_logging_config,
|
||||
)
|
||||
from django.test import TestCase
|
||||
|
||||
|
||||
class JSONFormatterTest(TestCase):
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
|
||||
from io import StringIO
|
||||
|
||||
from apps.core.management.commands.base import BaseAppCommand
|
||||
from django.core.management.base import CommandError
|
||||
from django.test import TestCase
|
||||
|
||||
from apps.core.management.commands.base import BaseAppCommand
|
||||
|
||||
|
||||
class TestCommand(BaseAppCommand):
|
||||
"""Тестовая команда для проверки BaseAppCommand."""
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
"""Тесты для Model Mixins."""
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
from apps.core.mixins import (
|
||||
OrderableMixin,
|
||||
SoftDeleteMixin,
|
||||
StatusMixin,
|
||||
)
|
||||
from django.test import TestCase
|
||||
|
||||
|
||||
class TimestampMixinTest(TestCase):
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
"""Tests for core OpenAPI utilities"""
|
||||
|
||||
from django.test import TestCase
|
||||
from drf_yasg import openapi
|
||||
from rest_framework import serializers
|
||||
|
||||
from apps.core.openapi import (
|
||||
CommonParameters,
|
||||
CommonResponses,
|
||||
@@ -11,6 +7,9 @@ from apps.core.openapi import (
|
||||
api_docs,
|
||||
paginated_response,
|
||||
)
|
||||
from django.test import TestCase
|
||||
from drf_yasg import openapi
|
||||
from rest_framework import serializers
|
||||
|
||||
|
||||
class DummySerializer(serializers.Serializer):
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
"""Tests for core permissions"""
|
||||
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.test import RequestFactory, TestCase
|
||||
from rest_framework.views import APIView
|
||||
|
||||
from apps.core.permissions import (
|
||||
IsAdmin,
|
||||
IsAdminOrReadOnly,
|
||||
@@ -13,6 +9,10 @@ from apps.core.permissions import (
|
||||
IsSuperuser,
|
||||
IsVerified,
|
||||
)
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.test import RequestFactory, TestCase
|
||||
from rest_framework.views import APIView
|
||||
|
||||
from tests.apps.user.factories import UserFactory
|
||||
|
||||
User = get_user_model()
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
"""Tests for core response wrapper"""
|
||||
|
||||
from django.test import TestCase
|
||||
from rest_framework import status
|
||||
|
||||
from apps.core.response import (
|
||||
api_created_response,
|
||||
api_error_response,
|
||||
@@ -10,6 +7,8 @@ from apps.core.response import (
|
||||
api_paginated_response,
|
||||
api_response,
|
||||
)
|
||||
from django.test import TestCase
|
||||
from rest_framework import status
|
||||
|
||||
|
||||
class APIResponseTest(TestCase):
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
"""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 apps.core.signals import (
|
||||
SignalDispatcher,
|
||||
emit_password_changed,
|
||||
@@ -15,6 +11,10 @@ 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()
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
"""Tests for core Celery tasks"""
|
||||
|
||||
from celery import Task
|
||||
from django.test import TestCase
|
||||
|
||||
from apps.core.tasks import (
|
||||
BaseTask,
|
||||
IdempotentTask,
|
||||
@@ -10,6 +7,8 @@ from apps.core.tasks import (
|
||||
TimedTask,
|
||||
TransactionalTask,
|
||||
)
|
||||
from celery import Task
|
||||
from django.test import TestCase
|
||||
|
||||
|
||||
class BaseTaskTest(TestCase):
|
||||
|
||||
@@ -4,14 +4,6 @@ from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from django.test import TestCase, override_settings
|
||||
from django.urls import include, path
|
||||
from rest_framework import serializers, status, viewsets
|
||||
from rest_framework.decorators import action
|
||||
from rest_framework.permissions import IsAuthenticated
|
||||
from rest_framework.routers import DefaultRouter
|
||||
from rest_framework.test import APITestCase
|
||||
|
||||
from apps.core.pagination import StandardPagination
|
||||
from apps.core.viewsets import (
|
||||
BaseViewSet,
|
||||
@@ -21,6 +13,14 @@ from apps.core.viewsets import (
|
||||
)
|
||||
from apps.organization.models import Organization
|
||||
from apps.user.models import Profile, User
|
||||
from django.test import TestCase, override_settings
|
||||
from django.urls import include, path
|
||||
from rest_framework import serializers, status, viewsets
|
||||
from rest_framework.decorators import action
|
||||
from rest_framework.permissions import IsAuthenticated
|
||||
from rest_framework.routers import DefaultRouter
|
||||
from rest_framework.test import APITestCase
|
||||
|
||||
from tests.apps.organization.factories import OrganizationFactory, fake
|
||||
from tests.apps.user.factories import ProfileFactory, UserFactory
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from apps.exchange.models import ExchangeDeliveryChannel, ExchangePackageImport
|
||||
from apps.organization.models import Organization
|
||||
from django.test import TestCase
|
||||
from django.urls import reverse
|
||||
|
||||
from apps.exchange.models import ExchangeDeliveryChannel, ExchangePackageImport
|
||||
from apps.organization.models import Organization
|
||||
from tests.apps.exchange.test_api import build_exchange_archive, build_exchange_payload
|
||||
from tests.apps.user.factories import UserFactory
|
||||
|
||||
|
||||
@@ -12,15 +12,6 @@ from datetime import date
|
||||
from io import BytesIO
|
||||
from zipfile import ZIP_DEFLATED, ZipFile
|
||||
|
||||
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
|
||||
from django.conf import settings
|
||||
from django.core.files.uploadedfile import SimpleUploadedFile
|
||||
from django.core.management import call_command
|
||||
from django.urls import reverse
|
||||
from django.utils.crypto import get_random_string
|
||||
from rest_framework import status
|
||||
from rest_framework.test import APITestCase
|
||||
|
||||
from apps.exchange.models import ExchangeDeliveryChannel, ExchangePackageImport
|
||||
from apps.exchange.services import ExchangePackageImportService
|
||||
from apps.external_data.models import (
|
||||
@@ -31,6 +22,14 @@ from apps.external_data.models import (
|
||||
)
|
||||
from apps.organization.models import Organization
|
||||
from apps.user.models import User
|
||||
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
|
||||
from django.conf import settings
|
||||
from django.core.files.uploadedfile import SimpleUploadedFile
|
||||
from django.core.management import call_command
|
||||
from django.urls import reverse
|
||||
from django.utils.crypto import get_random_string
|
||||
from rest_framework import status
|
||||
from rest_framework.test import APITestCase
|
||||
|
||||
TEST_TOKEN = settings.EXCHANGE_SHARED_TOKEN
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
"""Factories for external data models."""
|
||||
|
||||
import factory
|
||||
from faker import Faker
|
||||
|
||||
from apps.external_data.models import (
|
||||
ArbitrationCase,
|
||||
IndustrialProduct,
|
||||
ProsecutorCheck,
|
||||
PublicProcurement,
|
||||
)
|
||||
from faker import Faker
|
||||
|
||||
from tests.apps.organization.factories import OrganizationFactory
|
||||
|
||||
fake = Faker("ru_RU")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
"""Factories for form_1 app."""
|
||||
|
||||
import factory
|
||||
from apps.form_1.models import FormF1Record
|
||||
from faker import Faker
|
||||
|
||||
from apps.form_1.models import FormF1Record
|
||||
from tests.apps.organization.factories import OrganizationFactory
|
||||
|
||||
fake = Faker("ru_RU")
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
"""Tests for FormF1 services."""
|
||||
|
||||
from apps.form_1.services import FormF1Parser, FormF1Service
|
||||
from django.test import TestCase
|
||||
|
||||
from apps.form_1.services import FormF1Parser, FormF1Service
|
||||
from tests.apps.organization.factories import OrganizationFactory
|
||||
|
||||
from .factories import FormF1RecordFactory
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
"""Factories for form_2 app."""
|
||||
|
||||
import factory
|
||||
from apps.form_2.models import FormF2Record
|
||||
from faker import Faker
|
||||
|
||||
from apps.form_2.models import FormF2Record
|
||||
from tests.apps.organization.factories import OrganizationFactory
|
||||
|
||||
fake = Faker("ru_RU")
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
"""Tests for FormF2 services."""
|
||||
|
||||
from apps.form_2.services import FormF2Parser, FormF2Service
|
||||
from django.test import TestCase
|
||||
|
||||
from apps.form_2.services import FormF2Parser, FormF2Service
|
||||
from tests.apps.organization.factories import OrganizationFactory
|
||||
|
||||
from .factories import FormF2RecordFactory
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
"""Factories for form_3 app."""
|
||||
|
||||
import factory
|
||||
from apps.form_3.models import FormF3Record
|
||||
from faker import Faker
|
||||
|
||||
from apps.form_3.models import FormF3Record
|
||||
from tests.apps.organization.factories import OrganizationFactory
|
||||
|
||||
fake = Faker("ru_RU")
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
"""Tests for FormF3 services."""
|
||||
|
||||
from apps.form_3.services import FormF3Parser, FormF3Service
|
||||
from django.test import TestCase
|
||||
|
||||
from apps.form_3.services import FormF3Parser, FormF3Service
|
||||
from tests.apps.organization.factories import OrganizationFactory
|
||||
|
||||
from .factories import FormF3RecordFactory
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
"""Factories for form_4 app."""
|
||||
|
||||
import factory
|
||||
from apps.form_4.models import FormF4Record
|
||||
from faker import Faker
|
||||
|
||||
from apps.form_4.models import FormF4Record
|
||||
from tests.apps.organization.factories import OrganizationFactory
|
||||
|
||||
fake = Faker("ru_RU")
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
"""Tests for FormF4 services."""
|
||||
|
||||
from apps.form_4.services import FormF4Parser, FormF4Service
|
||||
from django.test import TestCase
|
||||
|
||||
from apps.form_4.services import FormF4Parser, FormF4Service
|
||||
from tests.apps.organization.factories import OrganizationFactory
|
||||
|
||||
from .factories import FormF4RecordFactory
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
"""Factories for form_5 app."""
|
||||
|
||||
import factory
|
||||
from apps.form_5.models import FormF5Record
|
||||
from faker import Faker
|
||||
|
||||
from apps.form_5.models import FormF5Record
|
||||
from tests.apps.organization.factories import OrganizationFactory
|
||||
|
||||
fake = Faker("ru_RU")
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
"""Tests for FormF5 services."""
|
||||
|
||||
from apps.form_5.services import FormF5Parser, FormF5Service
|
||||
from django.test import TestCase
|
||||
|
||||
from apps.form_5.services import FormF5Parser, FormF5Service
|
||||
from tests.apps.organization.factories import OrganizationFactory
|
||||
|
||||
from .factories import FormF5RecordFactory
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
"""Factories for form_6 app."""
|
||||
|
||||
import factory
|
||||
from apps.form_6.models import FormF6Record
|
||||
from faker import Faker
|
||||
|
||||
from apps.form_6.models import FormF6Record
|
||||
from tests.apps.organization.factories import OrganizationFactory
|
||||
|
||||
fake = Faker("ru_RU")
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
"""Tests for FormF6 services."""
|
||||
|
||||
from apps.form_6.services import FormF6Parser, FormF6Service
|
||||
from django.test import TestCase
|
||||
|
||||
from apps.form_6.services import FormF6Parser, FormF6Service
|
||||
from tests.apps.organization.factories import OrganizationFactory
|
||||
|
||||
from .factories import FormF6RecordFactory
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
"""Factories for organization app."""
|
||||
|
||||
import factory
|
||||
from faker import Faker
|
||||
|
||||
from apps.organization.models import IndustryCluster, Organization, OrganizationType
|
||||
from faker import Faker
|
||||
|
||||
fake = Faker("ru_RU")
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ from __future__ import annotations
|
||||
from datetime import date
|
||||
from decimal import Decimal
|
||||
|
||||
from apps.registers.models import Register, RegisterUpload, RegistryMembershipPeriod
|
||||
from django.test import override_settings
|
||||
from rest_framework import status
|
||||
from rest_framework.test import APITestCase
|
||||
|
||||
from apps.registers.models import Register, RegisterUpload, RegistryMembershipPeriod
|
||||
from tests.apps.form_1.factories import FormF1RecordFactory
|
||||
from tests.apps.form_2.factories import FormF2RecordFactory
|
||||
from tests.apps.form_3.factories import FormF3RecordFactory
|
||||
|
||||
@@ -4,11 +4,11 @@ from __future__ import annotations
|
||||
|
||||
from datetime import date
|
||||
|
||||
from apps.registers.models import Register, RegisterUpload, RegistryMembershipPeriod
|
||||
from django.test import override_settings
|
||||
from rest_framework import status
|
||||
from rest_framework.test import APITestCase
|
||||
|
||||
from apps.registers.models import Register, RegisterUpload, RegistryMembershipPeriod
|
||||
from tests.apps.organization.factories import OrganizationFactory
|
||||
from tests.apps.user.factories import UserFactory
|
||||
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
|
||||
from datetime import date
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
from apps.registers.models import Register, RegisterUpload, RegistryMembershipPeriod
|
||||
from django.test import TestCase
|
||||
|
||||
from .factories import OrganizationFactory
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
"""Tests for Organization services."""
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
from apps.organization.services import OrganizationService
|
||||
from django.test import TestCase
|
||||
|
||||
from .factories import OrganizationFactory
|
||||
|
||||
|
||||
@@ -11,15 +11,14 @@ from datetime import date
|
||||
from io import BytesIO
|
||||
from zipfile import ZIP_DEFLATED, ZipFile
|
||||
|
||||
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
|
||||
from django.core.files.uploadedfile import SimpleUploadedFile
|
||||
from django.test import TestCase, override_settings
|
||||
from django.utils.crypto import get_random_string
|
||||
|
||||
from apps.organization.models import Organization
|
||||
from apps.registers.models import Register, RegisterUpload, RegistryMembershipPeriod
|
||||
from apps.registers.services import RegisterBackupImportService
|
||||
from apps.user.models import User
|
||||
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
|
||||
from django.core.files.uploadedfile import SimpleUploadedFile
|
||||
from django.test import TestCase, override_settings
|
||||
from django.utils.crypto import get_random_string
|
||||
|
||||
TEST_BACKUP_KEY = base64.urlsafe_b64encode(b"k" * 32).decode("ascii").rstrip("=")
|
||||
TEST_AAD = b"state-corp-backup-v1"
|
||||
|
||||
@@ -5,13 +5,12 @@ from __future__ import annotations
|
||||
import io
|
||||
from datetime import date
|
||||
|
||||
from django.core.files.uploadedfile import SimpleUploadedFile
|
||||
from django.test import TestCase
|
||||
from openpyxl import Workbook
|
||||
|
||||
from apps.organization.models import Organization
|
||||
from apps.registers.models import Register, RegisterUpload, RegistryMembershipPeriod
|
||||
from apps.registers.services import RegisterImportService
|
||||
from django.core.files.uploadedfile import SimpleUploadedFile
|
||||
from django.test import TestCase
|
||||
from openpyxl import Workbook
|
||||
|
||||
|
||||
def build_registry_upload(name: str, rows: list[dict[str, str]]) -> SimpleUploadedFile:
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
"""Фабрики для создания тестовых объектов с использованием factory_boy и faker"""
|
||||
|
||||
import factory
|
||||
from faker import Faker
|
||||
|
||||
from apps.user.models import Profile, User
|
||||
from faker import Faker
|
||||
|
||||
fake = Faker("ru_RU")
|
||||
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
"""Tests for user serializers"""
|
||||
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.test import TestCase
|
||||
from faker import Faker
|
||||
|
||||
from apps.user.serializers import (
|
||||
LoginSerializer,
|
||||
PasswordChangeSerializer,
|
||||
@@ -13,6 +9,9 @@ from apps.user.serializers import (
|
||||
UserSerializer,
|
||||
UserUpdateSerializer,
|
||||
)
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.test import TestCase
|
||||
from faker import Faker
|
||||
|
||||
from .factories import ProfileFactory, UserFactory
|
||||
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
"""Tests for user services"""
|
||||
|
||||
from apps.core.exceptions import NotFoundError
|
||||
from apps.user.services import ProfileService, UserService
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.test import TestCase
|
||||
from faker import Faker
|
||||
from rest_framework_simplejwt.tokens import RefreshToken
|
||||
|
||||
from apps.core.exceptions import NotFoundError
|
||||
from apps.user.services import ProfileService, UserService
|
||||
|
||||
from .factories import ProfileFactory, UserFactory
|
||||
|
||||
User = get_user_model()
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
"""Tests for user DRF views"""
|
||||
|
||||
from apps.user.models import Profile
|
||||
from apps.user.services import UserService
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.urls import reverse
|
||||
from faker import Faker
|
||||
from rest_framework import status
|
||||
from rest_framework.test import APITestCase
|
||||
|
||||
from apps.user.models import Profile
|
||||
from apps.user.services import UserService
|
||||
|
||||
from .factories import ProfileFactory, UserFactory
|
||||
|
||||
User = get_user_model()
|
||||
|
||||
Reference in New Issue
Block a user