test(accounting): expect updated_date_utc_string in invoice fixtures#230
Open
shehanster wants to merge 1 commit into
Open
test(accounting): expect updated_date_utc_string in invoice fixtures#230shehanster wants to merge 1 commit into
shehanster wants to merge 1 commit into
Conversation
gcxero
approved these changes
Jul 1, 2026
gcxero
left a comment
There was a problem hiding this comment.
LGTM! Thanks for your help amending these.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(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.