✅ Refactor OpenAPI tests, prepare for Pydantic v2#9503
Merged
Conversation
Contributor
Contributor
|
lol
…On Mon, May 8, 2023, 4:37 PM github-actions[bot] ***@***.***> wrote:
📝 Docs preview for commit 8ff855c
<8ff855c>
at: https://64595de4b0b5812debbcfff4--fastapi.netlify.app
—
Reply to this email directly, view it on GitHub
<#9503 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A7VCCCSJK6WYYKHNTK7CDR3XFFRRVANCNFSM6AAAAAAX2NKQXY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
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.
✅ Refactor OpenAPI tests, prepare for Pydantic v2
During the migration, it will be very useful to check the tests with
insert_assertfrom https://github.com/samuelcolvin/python-devtoolsThis prepares the code for that.
Before this change, there was normally a variable with
openapi_schema, containing all the OpenAPI schema for each app tested. Then that was checked in a test for that.But this doesn't allow easily inlining the result with
insert_assert. By moving that schema to inside of the test, I'll be able to explore withinsert_assertand verify in the diff what is wrong (later during the migration to Pydantic v2).This needed to be done here, before that, because it only moves code/data around. But the diff is gigantic, so it shouldn't be mixed with code changing actual logic.
I also wanted to do it, to be able to keep using
insert_assert, but that needed many consecutive hours of work, and a reason to go through all that work. But now this is a good reason to do it. 🤓