Skip to content

Test helpers

components.payment_gateway.subcomponents.banking_documents.models.tests.factories

SepaMandateFactory

Bases: AlanBaseFactory[SepaMandate]

Meta

model class-attribute instance-attribute
model = SepaMandate

account_holder class-attribute instance-attribute

account_holder = SubFactory(AccountHolderFactory)

debtor_country class-attribute instance-attribute

debtor_country = 'FRA'

debtor_iban class-attribute instance-attribute

debtor_iban = Faker('iban')

debtor_name class-attribute instance-attribute

debtor_name = 'Jean Dupont'

external_id class-attribute instance-attribute

external_id = Faker('random_string', length=16)

issued_at class-attribute instance-attribute

issued_at = LazyFunction(lambda: now())

sepa_creditor_identifier class-attribute instance-attribute

sepa_creditor_identifier = 'FR1234567890'

unique_mandate_reference class-attribute instance-attribute

unique_mandate_reference = str(Faker('uuid4'))

workspace_key class-attribute instance-attribute

workspace_key = Faker('random_string', length=16)

SepaMandateStatusLogFactory

Bases: AlanBaseFactory[SepaMandateStatusLog]

Meta

model class-attribute instance-attribute
model = SepaMandateStatusLog

sepa_mandate class-attribute instance-attribute

sepa_mandate = SubFactory(SepaMandateFactory)

status class-attribute instance-attribute

status = enabled

SepaPaymentMandateFactory

Bases: AlanBaseFactory[SepaPaymentMandate]

Meta

model class-attribute instance-attribute
model = SepaPaymentMandate
creditor_legal_entity = SubFactory(LegalEntityFactory)

debtor_financial_instrument class-attribute instance-attribute

debtor_financial_instrument = SubFactory(
    IBANAccountFinancialInstrumentFactory
)

payment_type class-attribute instance-attribute

payment_type = RECURRENT

scheme class-attribute instance-attribute

scheme = CORE

umr class-attribute instance-attribute

umr = Faker('random_string', length=35)

unique_key class-attribute instance-attribute

unique_key = LazyFunction(lambda: uuid4())

valid_until class-attribute instance-attribute

valid_until = LazyFunction(
    lambda: utcnow() + relativedelta(months=36)
)