@AdeelH noted that the built in dictionary comparison of pytest for pydantic objects would work better than that current JSON string comparison. See this comment #15 (comment)
Ideally the fix for this solution will allow direct comparison of pydantic objects but the diff would use the dictionary comparison from pytest. The change would be made to this file https://github.com/Element84/e84-geoai-common/blob/main/src/e84_geoai_common/llm/tests/pydantic_compare.py