pnuckowski / aioresponses

Aioresponses is a helper for mock/fake web requests in python aiohttp package.
MIT License
513 stars 86 forks source link

Refactor assert_called_with to compare selected fields #257

Open hamedsh opened 7 months ago

hamedsh commented 7 months ago

This update refactors the method assert_called_with in the aioresponses module. The method now takes an optional argument, args_to_match, which allows the comparison between certain fields of the actual call and the expected call. This update also includes some improvements on the clarity and neatness of the methodology within the method. Relevant tests have been added to ensure the functionality of the updated code.