"""Public fixture helpers for :mod:`aeat.application.filing`.This module exposes frozen records that structurally satisfy the filingprofile/deadline protocols, plus registry-backed draft construction helpers.Tests can exercise application filing workflows without reaching into privatebuilder internals or replacing the production registry schema provider. Itdeliberately does not expose modelo-specific casilla schemas or formulas.See Also: :mod:`aeat.application.filing._testing_registry` Registry-backed draft builders re-exported by this facade. :mod:`aeat.application.filing.runtime` Production profile and schema-provider wiring used outside tests."""from__future__importannotationsfromdatetimeimportdatefrompydanticimportBaseModelfrom...coreimportSTRICT_FROZEN_CONFIG,Periodfrom...core.errorsimportFixtureProvisioningErrorfrom...core.identityimportSubjectTaxIdfrom._testing_registryimportbuild_registry_filing_draft,build_registry_filing_draft_from_decimals
[docs]classModeloTestProfile(BaseModel):"""Frozen :class:`aeat.application.filing.ModeloProfile` test record. Only ``tax_id`` and ``display_name`` are carried because those are the fields the filing application consumes when constructing a :class:`aeat.domain.filing.ModeloDraft`. """model_config=STRICT_FROZEN_CONFIGtax_id:SubjectTaxIddisplay_name:str
[docs]classModeloTestDeadlineStatus(BaseModel):"""Frozen :class:`aeat.application.filing.DeadlineStatus` test record."""model_config=STRICT_FROZEN_CONFIGdue_date:dateis_overdue:bool
[docs]classModeloTestDeadlineChecker(BaseModel):"""Frozen :class:`aeat.application.filing.DeadlineChecker` test record. The checker returns the same :class:`ModeloTestDeadlineStatus` for every ``(modelo, period)`` query, which keeps :class:`aeat.application.filing.ModeloValidator` deadline checks deterministic. """model_config=STRICT_FROZEN_CONFIGstatus:ModeloTestDeadlineStatus
[docs]defcheck(self,modelo:str,period:Period)->ModeloTestDeadlineStatus:"""Return the configured :class:`ModeloTestDeadlineStatus`. The ``modelo`` and typed :class:`~aeat.core.Period` inputs are accepted to satisfy :class:`aeat.application.filing.DeadlineChecker`; this helper intentionally ignores them and returns the configured status. """delmodelo,periodreturnself.status