kandi background
Explore Kits

10 best Python Mock libraries in 2022

by Open Weaver kits ✔ Updated: Apr 6, 2022

Mock objects make it possible to write automated tests for code that depends on external services or resources. The most common scenario is when a web application depends on some kind of database. Mocking the database allows you to write tests that check that code that uses the database is operating correctly without actually performing any database operations (which may well be slow or impossible). In this kit, we will discuss the top 8 Python Mock Open Source libraries that you can use in your testing project. moto - easily mock out tests based on AWS infrastructure; responses - A utility for mocking out the Python Requests library; vcrpy - Automatically mock your HTTP interactions.

motoby spulec

Python star image 6558 Version:4.0.12

License: Permissive (Apache-2.0)

A library that allows you to easily mock out tests based on AWS infrastructure.

Support
Quality
Security
License
Reuse

motoby spulec

Python star image 6558 Version:4.0.12 License: Permissive (Apache-2.0)

A library that allows you to easily mock out tests based on AWS infrastructure.
Support
Quality
Security
License
Reuse

responsesby getsentry

Python star image 3532 Version:0.22.0

License: Permissive (Apache-2.0)

A utility for mocking out the Python Requests library.

Support
Quality
Security
License
Reuse

responsesby getsentry

Python star image 3532 Version:0.22.0 License: Permissive (Apache-2.0)

A utility for mocking out the Python Requests library.
Support
Quality
Security
License
Reuse

vcrpyby kevin1024

Python star image 2339 Version:4.2.1

License: Permissive (MIT)

Automatically mock your HTTP interactions to simplify and speed up testing

Support
Quality
Security
License
Reuse

vcrpyby kevin1024

Python star image 2339 Version:4.2.1 License: Permissive (MIT)

Automatically mock your HTTP interactions to simplify and speed up testing
Support
Quality
Security
License
Reuse

HTTPrettyby gabrielfalcao

Python star image 2002 Version:1.1.4

License: Permissive (MIT)

Intercept HTTP requests at the Python socket level. Fakes the whole socket module

Support
Quality
Security
License
Reuse

HTTPrettyby gabrielfalcao

Python star image 2002 Version:1.1.4 License: Permissive (MIT)

Intercept HTTP requests at the Python socket level. Fakes the whole socket module
Support
Quality
Security
License
Reuse

pytest-mockby pytest-dev

Python star image 1504 Version:3.10.0

License: Permissive (MIT)

Thin-wrapper around the mock package for easier use with pytest

Support
Quality
Security
License
Reuse

pytest-mockby pytest-dev

Python star image 1504 Version:3.10.0 License: Permissive (MIT)

Thin-wrapper around the mock package for easier use with pytest
Support
Quality
Security
License
Reuse

mongomockby mongomock

Python star image 788 Version:4.1.2

License: Others (Non-SPDX)

Small library for mocking pymongo collection objects for testing purposes

Support
Quality
Security
License
Reuse

mongomockby mongomock

Python star image 788 Version:4.1.2 License: Others (Non-SPDX)

Small library for mocking pymongo collection objects for testing purposes
Support
Quality
Security
License
Reuse

requests-mockby jamielennox

Python star image 328 Version:1.10.0

License: Permissive (Apache-2.0)

Mocked responses for the requests library

Support
Quality
Security
License
Reuse

requests-mockby jamielennox

Python star image 328 Version:1.10.0 License: Permissive (Apache-2.0)

Mocked responses for the requests library
Support
Quality
Security
License
Reuse

django-mock-queriesby stphivos

Python star image 193 Version:2.1.7

License: Permissive (MIT)

A library for mocking django queryset functions in memory for testing

Support
Quality
Security
License
Reuse

django-mock-queriesby stphivos

Python star image 193 Version:2.1.7 License: Permissive (MIT)

A library for mocking django queryset functions in memory for testing
Support
Quality
Security
License
Reuse

aws-mock-metadataby dump247

Python star image 105 Version:Current

License: Permissive (MIT)

Mock EC2 metadata service that can run on a developer machine

Support
Quality
Security
License
Reuse

aws-mock-metadataby dump247

Python star image 105 Version:Current License: Permissive (MIT)

Mock EC2 metadata service that can run on a developer machine
Support
Quality
Security
License
Reuse

mock-alchemyby rajivsarvepalli

Python star image 48 Version:0.2.5

License: Permissive (MIT)

SQLAlchemy mock helpers.

Support
Quality
Security
License
Reuse

mock-alchemyby rajivsarvepalli

Python star image 48 Version:0.2.5 License: Permissive (MIT)

SQLAlchemy mock helpers.
Support
Quality
Security
License
Reuse

See similar Kits and Libraries

Mock
Testing