pytest-flask
pymox
pytest-flask | pymox | |
---|---|---|
1 | - | |
476 | 14 | |
1.1% | - | |
7.3 | 9.2 | |
22 days ago | 4 months ago | |
Python | Python | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
pytest-flask
-
Python: pytest accessing Flask session and request context variables.
@pytest.fixture(scope='module') def test_client( app ): """ Creates a test client. app.test_client() is able to submit HTTP requests. The app argument is the app() fixture above. """ with app.test_client() as testing_client: """ See: https://github.com/pytest-dev/pytest-flask/issues/69 Sessions are empty when testing #69 """ with testing_client.session_transaction() as session: session['Authorization'] = 'redacted' yield testing_client # Return to caller.
pymox
We haven't tracked posts mentioning pymox yet.
Tracking mentions began in Dec 2020.
What are some alternatives?
mocksafe - Type-safe mocking for Python.
betamax - A VCR imitation designed only for python-requests.
mock - The Python mock library
doublex
httmock - A mocking library for requests
freezegun - Let your Python tests travel through time
time-machine - Travel through time in your tests.
VCR.py - Automatically mock your HTTP interactions to simplify and speed up testing
Moto - A library that allows you to easily mock out tests based on AWS infrastructure.
httpretty - Intercept HTTP requests at the Python socket level. Fakes the whole socket module
Mocket - a socket mock framework - for all kinds of socket animals, web-clients included
responses - A utility for mocking out the Python Requests library.