feat: import additional exchange sections
All checks were successful
CI/CD Pipeline / Code Quality Checks (push) Successful in 2m41s
CI/CD Pipeline / Run Tests (push) Successful in 2m47s
CI/CD Pipeline / Build Docker Images (push) Successful in 2m24s
CI/CD Pipeline / Push to Gitea Registry (push) Successful in 0s
CI/CD Pipeline / Deploy to Server (push) Successful in 0s
All checks were successful
CI/CD Pipeline / Code Quality Checks (push) Successful in 2m41s
CI/CD Pipeline / Run Tests (push) Successful in 2m47s
CI/CD Pipeline / Build Docker Images (push) Successful in 2m24s
CI/CD Pipeline / Push to Gitea Registry (push) Successful in 0s
CI/CD Pipeline / Deploy to Server (push) Successful in 0s
This commit is contained in:
@@ -3,10 +3,13 @@
|
||||
import factory
|
||||
from apps.external_data.models import (
|
||||
ArbitrationCase,
|
||||
BankruptcyProcedure,
|
||||
DefenseUnreliableSupplier,
|
||||
IndustrialProduct,
|
||||
InformationSecurityRegistryEntry,
|
||||
LaborVacancy,
|
||||
ProsecutorCheck,
|
||||
PublicProcurement,
|
||||
InformationSecurityRegistryEntry,
|
||||
)
|
||||
from faker import Faker
|
||||
|
||||
@@ -71,9 +74,7 @@ class ArbitrationCaseFactory(factory.django.DjangoModelFactory):
|
||||
decision_date = factory.LazyAttribute(lambda _: fake.date_this_year())
|
||||
|
||||
|
||||
class InformationSecurityRegistryEntryFactory(
|
||||
factory.django.DjangoModelFactory
|
||||
):
|
||||
class InformationSecurityRegistryEntryFactory(factory.django.DjangoModelFactory):
|
||||
class Meta:
|
||||
model = InformationSecurityRegistryEntry
|
||||
|
||||
@@ -83,3 +84,45 @@ class InformationSecurityRegistryEntryFactory(
|
||||
entry_number = "77-001234"
|
||||
issued_at = factory.LazyAttribute(lambda _: fake.date_this_year())
|
||||
expires_at = factory.LazyAttribute(lambda _: fake.date_this_year())
|
||||
|
||||
|
||||
class BankruptcyProcedureFactory(factory.django.DjangoModelFactory):
|
||||
class Meta:
|
||||
model = BankruptcyProcedure
|
||||
|
||||
organization = factory.SubFactory(OrganizationFactory)
|
||||
external_id = factory.Sequence(lambda n: f"fedresurs:{n}")
|
||||
message_type = "Сообщение о намерении"
|
||||
message_date = factory.LazyAttribute(lambda _: fake.date_this_year())
|
||||
case_number = factory.Sequence(lambda n: f"А40-{20_000 + n}/2026")
|
||||
status = "published"
|
||||
source_url = factory.Sequence(lambda n: f"https://fedresurs.ru/message/{n}")
|
||||
|
||||
|
||||
class DefenseUnreliableSupplierFactory(factory.django.DjangoModelFactory):
|
||||
class Meta:
|
||||
model = DefenseUnreliableSupplier
|
||||
|
||||
organization = factory.SubFactory(OrganizationFactory)
|
||||
external_id = factory.Sequence(lambda n: f"fas-goz:{n}")
|
||||
registry_source = "fas_goz"
|
||||
registry_number = factory.Sequence(lambda n: f"ГОЗ-{n:04d}")
|
||||
supplier_name = factory.LazyAttribute(lambda obj: obj.organization.name)
|
||||
reason = "Уклонение от заключения контракта"
|
||||
included_at = factory.LazyAttribute(lambda _: fake.date_this_year())
|
||||
status = "active"
|
||||
source_url = factory.Sequence(lambda n: f"https://fas.gov.ru/register/{n}")
|
||||
|
||||
|
||||
class LaborVacancyFactory(factory.django.DjangoModelFactory):
|
||||
class Meta:
|
||||
model = LaborVacancy
|
||||
|
||||
organization = factory.SubFactory(OrganizationFactory)
|
||||
external_id = factory.Sequence(lambda n: f"trudvsem:{n}")
|
||||
vacancy_source = "trudvsem"
|
||||
title = "Инженер-испытатель"
|
||||
status = "open"
|
||||
published_at = factory.LazyAttribute(lambda _: fake.date_this_year())
|
||||
salary_amount = "175000.00"
|
||||
source_url = factory.Sequence(lambda n: f"https://trudvsem.ru/vacancy/{n}")
|
||||
|
||||
Reference in New Issue
Block a user