![python - Pytest mock.patch requests AttributeError: does not have the attribute 'json' - Stack Overflow python - Pytest mock.patch requests AttributeError: does not have the attribute 'json' - Stack Overflow](https://i.stack.imgur.com/ZYCuH.png)
python - Pytest mock.patch requests AttributeError: does not have the attribute 'json' - Stack Overflow
mock.patch cannot import an invalid-name module in >=3.11 due to importlib.import_module vs pkgutil.resolve_name differences when module has a dash in its filename · Issue #100950 · python/cpython · GitHub
![Python Unit Testing with MagicMock, @patch, and @patch.object | by Kenichi Shibata | FAUN — Developer Community 🐾 Python Unit Testing with MagicMock, @patch, and @patch.object | by Kenichi Shibata | FAUN — Developer Community 🐾](https://miro.medium.com/v2/resize:fit:1200/1*ok5Hzoh1-VRrFauv4AonLg.jpeg)