An open API service indexing awesome lists of open source software.

https://github.com/pytest-with-eric/pytest-overmocking-examples

Common Mocking Problems & How To Avoid Them (+ Best Practices)
https://github.com/pytest-with-eric/pytest-overmocking-examples

mocking patching pytest-mock pytest-mock-assert-called

Last synced: about 1 month ago
JSON representation

Common Mocking Problems & How To Avoid Them (+ Best Practices)

Awesome Lists containing this project

README

        

# Pytest Common Mocking Problems Example

This repo contains the sample code for the article - [Common Mocking Problems & How To Avoid Them (+ Best Practices)](https://pytest-with-eric.com/mocking/pytest-common-mocking-problems/)

# Requirements
* Python (3.12)

Create a virtual environment and install the dependencies using
```shell
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```

# How To Run the Unit Tests
To run the Unit Tests, from the root of the repo run
```shell
pytest
```

If you have any questions about the project please raise an Issue on GitHub.