Skip to content

test(accounting): expect updated_date_utc_string in invoice fixtures#230

Open
shehanster wants to merge 1 commit into
masterfrom
test/petoss-975-updated-date-utc-string-fixtures
Open

test(accounting): expect updated_date_utc_string in invoice fixtures#230
shehanster wants to merge 1 commit into
masterfrom
test/petoss-975-updated-date-utc-string-fixtures

Conversation

@shehanster

Copy link
Copy Markdown

(PETOSS-975)

Adds the new updated_date_utc_string field to the expected invoice fixtures in tests/accounting/api/test_accounting_api.py 4 invoice objects across 2 tests (test_get_invoices ×3, test_update_or_create_invoices ×1). Test-only; no SDK/runtime code changes.

Why
The Accounting API is gaining UpdatedDateUTCString — a plain ISO-8601 string mirror of the existing UpdatedDateUTC (which serialises in the legacy /Date(…)/ format), added to support the new Prepayments/Overpayments webhooks ([PETOSS-975], monolith [Xero#26503], spec [XeroAPI/Xero-OpenAPI#823]).

The codegen-python gate regenerates this SDK from the OAS PR, boots a Prism mock off the response examples, and runs pytest with strict full-object equality (str(result) == str(expected)). The regenerated model now deserialises the field, but these hand-written fixtures didn't set it - so it defaulted to None while the mock returns the string, failing the two tests. This patch aligns the expected values.

The values are exactly what Prism emits (ISO-8601, seconds precision, Z suffix - the field is type: string with no format: date-time, so it stays a string rather than being coerced to a datetime). Invoice-level only; the nested Contact's updated_date_utc_string stays None, which already matches the mock.

@gcxero gcxero left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for your help amending these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants