tests: use syrupy for AsyncAPI schema snapshot testing (#2978) - #2979
tests: use syrupy for AsyncAPI schema snapshot testing (#2978)#2979ashishSoni1234 wants to merge 1 commit into
Conversation
Replace large hand-written dict literals in the shared AsyncAPI arguments test cases with syrupy snapshots, so expected schemas are generated once and diffed automatically instead of being maintained by hand across every broker/version test module.
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bae5ec714b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "type": "object", | ||
| }, | ||
| }, payload | ||
| assert payload == snapshot |
There was a problem hiding this comment.
Keep enum snapshots tolerant of Pydantic v1
When these shared AsyncAPI tests are run with Pydantic v1, enum definitions include Pydantic's generated description field; the previous IsPartialDict intentionally accepted that extra key, but the recorded syrupy snapshots are exact and were generated without it. That makes the Pydantic-v1 compatibility run fail for every broker/version inheriting this test (the 3.0.0 copy has the same change), so either keep a partial/filtered snapshot or provide separate v1/v2 snapshots.
Useful? React with 👍 / 👎.
Replace large hand-written dict literals in the shared AsyncAPI arguments test cases with syrupy snapshots, so expected schemas are generated once and diffed automatically instead of being maintained by hand across every broker/version test module.
Description
Please include a summary of the change and specify which issue is being addressed. Additionally, provide relevant motivation and context.
Fixes # (issue number)
Type of change
Please delete options that are not relevant.
Checklist
just lintshows no errors)just test-coveragejust static-analysis