Framework Mode - unittest.mock.patch
Folder Structure
my_pytest_project/ ├── tests/ │ ├── test_example.py # Test files using pytest and unittest.mock.patch │ └── __init__.py ├── src/ │ ├── module.py # Application code to be tested │ └── __init__.py ├── conftest.py # pytest fixtures and setup ├── requirements.txt # Dependencies including pytest └── pytest.ini # pytest configuration file