Skip to content

chore: use the API timestamp format in fixtures and docstrings - #249

Merged
felipefreitag merged 1 commit into
mainfrom
fix/timestamp-format-fixtures
Aug 6, 2026
Merged

chore: use the API timestamp format in fixtures and docstrings#249
felipefreitag merged 1 commit into
mainfrom
fix/timestamp-format-fixtures

Conversation

@felipefreitag

@felipefreitag felipefreitag commented Aug 6, 2026

Copy link
Copy Markdown
Member

What

The API returns timestamps in Postgres text format: YYYY-MM-DD HH:MM:SS[.ffffff]+00 (for example 2023-10-06 23:47:56.678+00). Our test fixtures and docstrings showed ISO 8601 for response fields. This PR makes them match the real API output.

  • Convert 276 response-fixture timestamps in 40 test files to Postgres format.
  • Remove the ISO 8601 claims from response-field docstrings (5 source files). The wording now matches the API reference.
  • Fix 3 webhook data.created_at fixtures from …894719+00:00 to …894Z. Real webhooks emit millisecond precision with Z.

What stays ISO 8601 on purpose

  • scheduled_at as a request parameter. The API accepts ISO there.
  • Webhook event payloads. Webhooks emit ISO with millisecond precision.
  • revoked_at in the revoke OAuth grant response. That endpoint returns ISO.

Why

The SDK never parses these values, so there are no runtime changes. But wrong fixtures propagate: new endpoints copy the pattern, and users who read the tests get the wrong contract.

Verification

  • pytest: 558 passed.
  • tox -e lint: OK.
  • tox -e mypy: no issues in 176 files.

Summary by cubic

Align fixtures and docstrings with the API’s timestamp format (Postgres text). No runtime behavior changes.

  • Refactors
    • Converted response fixtures to Postgres timestamps (e.g., "2023-10-06 23:47:56.678+00") across tests.
    • Updated response-field docstrings to remove ISO 8601 claims and match the API reference.
    • Fixed webhook event payload fixtures to ISO with millisecond precision and Z; kept ISO where the API uses it: the scheduled_at request param, webhook payloads, and revoked_at in the revoke OAuth grant response.

Written for commit 0eef200. Summary will update on new commits.

Review in cubic

The API returns timestamps in Postgres text format
(2023-10-06 23:47:56.678+00), not ISO 8601. Test fixtures and
docstrings claimed ISO 8601 for response fields.

Convert response fixtures to the real format. Remove the ISO 8601
claims from response docstrings. Fix the webhook data.created_at
fixtures to millisecond precision with Z, which matches real
webhook output.

Keep ISO 8601 where the API uses it: the scheduled_at request
param, webhook event payloads, and revoked_at in the revoke
response.

No runtime changes.

@klotty klotty 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.

No issues found across 45 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Updates test fixtures and docstrings to match the API's actual timestamp format (Postgres text). No runtime behavior changes; purely cosmetic/test alignment with no operational, security, or data tradeoffs.

Re-trigger cubic

@felipefreitag
felipefreitag merged commit dc327b2 into main Aug 6, 2026
22 checks passed
@felipefreitag
felipefreitag deleted the fix/timestamp-format-fixtures branch August 6, 2026 14:15
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.

3 participants