Miscellaneous Pydantic response updates#74
Miscellaneous Pydantic response updates#74JDCodes wants to merge 10 commits intojasondilworth56:mainfrom
Conversation
|
Thanks for getting to these – with the responses undocumented from iRacing it's very much trial and error to get full coverage. Could you make sure that you're updating the test files in
|
MemberProfileResponse activity optional None
|
i have done the testing you mentioned above and added the mock_return_data which caused the fails. |
|
|
||
| class MemberProfileResponse(BaseModel): | ||
| activity: MemberActivity | ||
| activity: MemberActivity | None = None |
There was a problem hiding this comment.
Have you spotted a member profile in the wild activity of None?
If so, add a new file member_profile_no_activity.json to mock_return_data with that profile and add a test for it.
There was a problem hiding this comment.
added the test and mock_return_data
| cust_id: int | None = None | ||
| division_name: str | None = None | ||
| driver_results: SessionResultDetailDriver | None = None | ||
| driver_results: list[SessionResultDetailDriver] | None = None |
There was a problem hiding this comment.
This could do with a matching file in the mock data and associated test too – I assume these are in team results but I'm not anywhere I can check at the moment.
There was a problem hiding this comment.
yes its a team result, i will add a test too
There was a problem hiding this comment.
added the test and mock_return_data
further testing MemberActivity = None
…or member profile with no activity
added optional None for logo