feat(registry): add new endpoints for registers, exchange, and backups; update routing and configurations
Some checks failed
CI/CD Pipeline / Code Quality Checks (push) Failing after 3m10s
CI/CD Pipeline / Run Tests (push) Successful in 3m35s
CI/CD Pipeline / Telegram Notify Success (push) Has been skipped
CI/CD Pipeline / Code Quality Checks (pull_request) Failing after 2m26s
CI/CD Pipeline / Run Tests (pull_request) Successful in 2m46s
CI/CD Pipeline / Telegram Notify Success (pull_request) Has been skipped
Some checks failed
CI/CD Pipeline / Code Quality Checks (push) Failing after 3m10s
CI/CD Pipeline / Run Tests (push) Successful in 3m35s
CI/CD Pipeline / Telegram Notify Success (push) Has been skipped
CI/CD Pipeline / Code Quality Checks (pull_request) Failing after 2m26s
CI/CD Pipeline / Run Tests (pull_request) Successful in 2m46s
CI/CD Pipeline / Telegram Notify Success (pull_request) Has been skipped
This commit is contained in:
23
tests/apps/exchange/factories.py
Normal file
23
tests/apps/exchange/factories.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""Фабрики для тестов exchange."""
|
||||
|
||||
import factory
|
||||
from apps.exchange.models import ExchangeConnection
|
||||
from faker import Faker
|
||||
|
||||
fake = Faker("ru_RU")
|
||||
|
||||
|
||||
class ExchangeConnectionFactory(factory.django.DjangoModelFactory):
|
||||
"""Фабрика для модели ExchangeConnection."""
|
||||
|
||||
class Meta:
|
||||
model = ExchangeConnection
|
||||
|
||||
server = factory.LazyAttribute(lambda _: fake.ipv4())
|
||||
port = 5432
|
||||
username = factory.LazyAttribute(lambda _: fake.user_name())
|
||||
password = factory.LazyAttribute(lambda _: fake.password())
|
||||
database_name = factory.Sequence(lambda n: f"target_db_{n + 1}")
|
||||
schema_name = "public"
|
||||
is_active = False
|
||||
last_error = ""
|
||||
Reference in New Issue
Block a user