Skip to content

Commit

Permalink
Run isort '--trailing-comma --force-grid-wrap=2 --multi-line=3'
Browse files Browse the repository at this point in the history
  • Loading branch information
hnryjmes committed Dec 5, 2024
1 parent 1d44e79 commit d986ec0
Show file tree
Hide file tree
Showing 10 changed files with 88 additions and 20 deletions.
44 changes: 36 additions & 8 deletions api/data_workspace/v2/tests/bdd/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
from django.urls import reverse
from freezegun import freeze_time
from moto import mock_aws
from pytest_bdd import given, parsers, then, when
from pytest_bdd import (
given,
parsers,
then,
when,
)
from rest_framework import status
from rest_framework.test import APIClient

Expand All @@ -22,29 +27,52 @@
StandardApplicationFactory,
)
from api.cases.celery_tasks import update_cases_sla
from api.cases.enums import AdviceLevel, AdviceType, CaseTypeEnum
from api.cases.models import CaseType, LicenceDecision
from api.cases.enums import (
AdviceLevel,
AdviceType,
CaseTypeEnum,
)
from api.cases.models import (
CaseType,
LicenceDecision,
)
from api.cases.tests.factories import FinalAdviceFactory
from api.core.constants import ExporterPermissions, GovPermissions, Roles
from api.core.constants import (
ExporterPermissions,
GovPermissions,
Roles,
)
from api.documents.libraries.s3_operations import init_s3_client
from api.flags.enums import SystemFlags
from api.goods.tests.factories import GoodFactory
from api.letter_templates.models import LetterTemplate
from api.licences.enums import LicenceStatus
from api.licences.models import Licence
from api.licences.tests.factories import GoodOnLicenceFactory, StandardLicenceFactory
from api.licences.tests.factories import (
GoodOnLicenceFactory,
StandardLicenceFactory,
)
from api.organisations.tests.factories import OrganisationFactory
from api.parties.enums import PartyType
from api.parties.tests.factories import PartyDocumentFactory
from api.staticdata.countries.models import Country
from api.staticdata.letter_layouts.models import LetterLayout
from api.staticdata.report_summaries.models import ReportSummaryPrefix, ReportSummarySubject
from api.staticdata.report_summaries.models import (
ReportSummaryPrefix,
ReportSummarySubject,
)
from api.staticdata.statuses.enums import CaseStatusEnum
from api.staticdata.statuses.models import CaseStatus
from api.staticdata.units.enums import Units
from api.users.enums import SystemUser, UserType
from api.users.enums import (
SystemUser,
UserType,
)
from api.users.libraries.user_to_token import user_to_token
from api.users.models import BaseUser, Permission
from api.users.models import (
BaseUser,
Permission,
)
from api.users.tests.factories import (
BaseUserFactory,
ExporterUserFactory,
Expand Down
12 changes: 10 additions & 2 deletions api/data_workspace/v2/tests/bdd/test_applications.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import pytest
from django.urls import reverse
from freezegun import freeze_time
from pytest_bdd import given, parsers, scenarios, when
from pytest_bdd import (
given,
parsers,
scenarios,
when,
)

from api.applications.enums import ApplicationExportType
from api.applications.tests.factories import (
Expand All @@ -10,7 +15,10 @@
PartyOnApplicationFactory,
)
from api.data_workspace.v2.tests.bdd.conftest import run_processing_time_task
from api.parties.tests.factories import PartyDocumentFactory, UltimateEndUserFactory
from api.parties.tests.factories import (
PartyDocumentFactory,
UltimateEndUserFactory,
)
from api.staticdata.statuses.enums import CaseStatusEnum

scenarios("./scenarios/applications.feature")
Expand Down
7 changes: 6 additions & 1 deletion api/data_workspace/v2/tests/bdd/test_countries.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import pytest
from django.urls import reverse
from pytest_bdd import given, scenarios, then, when
from pytest_bdd import (
given,
scenarios,
then,
when,
)

from api.staticdata.countries.models import Country

Expand Down
5 changes: 4 additions & 1 deletion api/data_workspace/v2/tests/bdd/test_destinations.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from datetime import datetime

from pytest_bdd import scenarios, when
from pytest_bdd import (
scenarios,
when,
)

scenarios("./scenarios/destinations.feature")

Expand Down
6 changes: 5 additions & 1 deletion api/data_workspace/v2/tests/bdd/test_footnotes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import pytest
from django.urls import reverse
from pytest_bdd import parsers, scenarios, when
from pytest_bdd import (
parsers,
scenarios,
when,
)

from api.staticdata.statuses.enums import CaseStatusEnum
from api.teams.models import Team
Expand Down
7 changes: 6 additions & 1 deletion api/data_workspace/v2/tests/bdd/test_goods.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import pytest
from django.urls import reverse
from pytest_bdd import given, scenarios, then, when
from pytest_bdd import (
given,
scenarios,
then,
when,
)

from api.applications.models import GoodOnApplication
from api.staticdata.statuses.enums import CaseStatusEnum
Expand Down
12 changes: 10 additions & 2 deletions api/data_workspace/v2/tests/bdd/test_goods_on_licences.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
from django.urls import reverse
from pytest_bdd import given, parsers, scenarios, when
from pytest_bdd import (
given,
parsers,
scenarios,
when,
)

from api.applications.tests.factories import GoodOnApplicationFactory
from api.licences.enums import LicenceStatus
from api.licences.tests.factories import StandardLicenceFactory
from api.staticdata.report_summaries.models import ReportSummaryPrefix, ReportSummarySubject
from api.staticdata.report_summaries.models import (
ReportSummaryPrefix,
ReportSummarySubject,
)

scenarios("./scenarios/goods_on_licences.feature")

Expand Down
5 changes: 4 additions & 1 deletion api/data_workspace/v2/tests/bdd/test_licence_decisions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from pytest_bdd import given, scenarios
from pytest_bdd import (
given,
scenarios,
)

from api.licences.enums import LicenceStatus

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import uuid

from pytest_bdd import parsers, scenarios, when
from pytest_bdd import (
parsers,
scenarios,
when,
)

scenarios("./scenarios/licence_refusal_criteria.feature")

Expand Down
4 changes: 2 additions & 2 deletions api/data_workspace/v2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
GoodOnLicenceSerializer,
GoodSerializer,
LicenceDecisionSerializer,
UnitSerializer,
LicenceRefusalCriteriaSerializer,
UnitSerializer,
)
from api.licences.enums import LicenceStatus
from api.licences.models import GoodOnLicence
from api.staticdata.control_list_entries.models import ControlListEntry
from api.staticdata.countries.models import Country
from api.staticdata.report_summaries.models import ReportSummary
from api.staticdata.denial_reasons.models import DenialReason
from api.staticdata.report_summaries.models import ReportSummary
from api.staticdata.statuses.enums import CaseStatusEnum
from api.staticdata.units.enums import Units

Expand Down

0 comments on commit d986ec0

Please sign in to comment.