Schemathesis

Latest version: v3.38.10

Safety actively analyzes 687881 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 14 of 51

3.19.2

:version:`3.19.2 <v3.19.1...v3.19.2>` - 2023-05-20
--------------------------------------------------

**Added**

- You can now provide a tuple of checks to exclude when validating a response.

3.19.1

:version:`3.19.1 <v3.19.0...v3.19.1>` - 2023-04-26
--------------------------------------------------

**Changed**

- Support ``requests<2.29``.

**Fixed**

- Passing ``params`` / ``cookies`` to ``case.call`` causing ``TypeError``. :issue:`1734`

**Removed**

- Direct dependency on ``attrs``.

3.19.0

:version:`3.19.0 <v3.18.5...v3.19.0>` - 2023-03-22
--------------------------------------------------

**Added**

- Schemathesis now supports custom authentication mechanisms from the ``requests`` library.
You can use ``schemathesis.auth.set_from_requests`` to set up Schemathesis CLI with any third-party authentication implementation that works with ``requests``. :issue:`1700`

.. code:: python

import schemathesis
from requests_ntlm import HttpNtlmAuth

schemathesis.auth.set_from_requests(HttpNtlmAuth("domain\\username", "password"))

- Ability to apply authentication conditionally to specific API operations using a combination of ``schemathesis.auth.apply_to()`` and ``schemathesis.auth.skip_for()`` decorators.

.. code:: python

import schemathesis


Apply auth only for operations that path starts with `/users/` but not the `POST` method
schemathesis.auth().apply_to(path_regex="^/users/").skip_for(method="POST")
class MyAuth:
...

- Add a convenience mapping-like interface to ``OperationDefinition`` including indexing access, the ``get`` method, and "in" support.
- Request throttling via the ``--rate-limit`` CLI option. :issue:`910`

**Changed**

- Unified Schemathesis custom authentication usage via the ``schema.auth`` decorator, replacing the previous ``schema.auth.register`` and ``schema.auth.apply`` methods:

.. code:: python

import schemathesis

schema = schemathesis.from_uri("https://example.schemathesis.io/openapi.json")


Schema-level auth
Before: schema.auth.register()
schema.auth()
class MyAuth:
...


Test-level auth
Before: schema.auth.apply(MyAuth)
schema.auth(MyAuth)
schema.parametrize()
def test_api(case):
...

**Fixed**

- Handling of query parameters and cookies passed to ``case.call`` and query parameters passed to ``case.call_wsgi``.
The user-provided values are now merged with the data generated by Schemathesis, instead of overriding it completely. :issue:`1705`
- Parameter definition takes precedence over security schemes with the same name.
- ``Unsatisfiable`` error when explicit header name passed via CLI clashes with the header parameter name. :issue:`1699`
- Not using the ``port`` keyword argument in schema loaders during API schema loading. :issue:`1721`

3.18.5

:version:`3.18.5 <v3.18.4...v3.18.5>` - 2023-02-18
--------------------------------------------------

**Added**

- Support for specifying the path to load hooks from via the ``SCHEMATHESIS_HOOKS`` environment variable. `1702`.

**Deprecated**

- Use of the ``--pre-run`` CLI option for loading hooks. Use the ``SCHEMATHESIS_HOOKS`` environment variable instead.

3.18.4

:version:`3.18.4 <v3.18.3...v3.18.4>` - 2023-02-16
--------------------------------------------------

**Changed**

- Support any Werkzeug 2.x in order to allow mitigation of `CVE-2023-25577 <https://github.com/advisories/GHSA-xg9f-g7g7-2323>`_. :issue:`1695`

3.18.3

Not secure
:version:`3.18.3 <v3.18.2...v3.18.3>` - 2023-02-12
--------------------------------------------------

**Added**

- ``APIStateMachine.run`` method to simplify running stateful tests.

**Changed**

- Improved quality of generated test sequences by updating state machines in Schemathesis to always run a minimum of two steps during testing. :issue:`1627`
If you use ``hypothesis.stateful.run_state_machine_as_test`` to run your stateful tests, please use the ``run`` method on your state machine class instead.
This change requires upgrading ``Hypothesis`` to at least version ``6.68.1``.

Page 14 of 51

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.