Schemathesis

Latest version: v3.38.10

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

Scan your dependencies

Page 28 of 51

3.6.0

Not secure
:version:`3.6.0 <v3.5.3...v3.6.0>` - 2021-04-04
-----------------------------------------------

**Added**

- Custom keyword arguments to ``schemathesis.graphql.from_url`` that are proxied to ``requests.post``.
- ``from_wsgi``, ``from_asgi``, ``from_path`` and ``from_file`` loaders for GraphQL apps. :issue:`1097`, :issue:`1100`
- Support for ``data_generation_methods`` and ``code_sample_style`` in all GraphQL loaders.
- Support for ``app`` & ``base_url`` arguments for the ``from_pytest_fixture`` runner.
- Initial support for GraphQL schemas in the Schemathesis runner.

.. code-block:: python

import schemathesis

Load schema
schema = schemathesis.graphql.from_url("http://127.0.0.1:8000/graphql")
Initialize runner
runner = schemathesis.runner.from_schema(schema)
Emit events
for event in runner.execute():
...

**Breaking**

- Loaders' signatures are unified. Most of the arguments became keyword-only. All except the first two for ASGI/WSGI, all except the first one for the others.
It forces loader calls to be more consistent.

.. code-block:: python

BEFORE
schema = schemathesis.from_uri(
"http://example.com/openapi.json", "http://127.0.0.1:8000/", "GET"
)
NOW
schema = schemathesis.from_uri(
"http://example.com/openapi.json", base_url="http://127.0.0.1:8000/", method="GET"
)

**Changed**

- Schemathesis generates separate tests for each field defined in the GraphQL ``Query`` type. It makes the testing process
unified for both Open API and GraphQL schemas.
- IDs for GraphQL tests use the corresponding ``Query`` field instead of HTTP method & path.
- Do not show overly verbose raw schemas in Hypothesis output for failed GraphQL tests.
- The ``schemathesis.graphql.from_url`` loader now uses the usual Schemathesis User-Agent.
- The Hypothesis database now uses separate entries for each API operation when executed via CLI. It increases its effectiveness when tests are re-run.
- Module ``schemathesis.loaders`` is moved to ``schemathesis.specs.openapi.loaders``.
- Show a more specific exception on incorrect usage of the ``from_path`` loader in the Schemathesis runner.

**Deprecated**

- ``schemathesis.runner.prepare`` will be removed in Schemathesis 4.0. Use ``schemathesis.runner.from_schema`` instead. With this change, the schema loading part
goes to your code, similar to using the regular Schemathesis Python API. It leads to a unified user experience where the starting point is API schema loading, which is
much clearer than passing a callback & keyword arguments to the ``prepare`` function.

**Fixed**

- Add the missing ``schema.given`` implementation for schemas created via the ``from_pytest_fixture`` loader. :issue:`1093`
- Silently ignoring some incorrect usages of ``schema.given``.
- Fixups examples were using the incorrect fixup name.
- Return type of ``make_case`` for GraphQL schemas.
- Missed ``operation_id`` argument in ``from_asgi`` loader.

**Removed**

- Undocumented way to install fixups via the ``fixups`` argument for ``schemathesis.runner.prepare`` is removed.

3.5.3

Not secure
:version:`3.5.3 <v3.5.2...v3.5.3>` - 2021-03-27
-----------------------------------------------

**Fixed**

- Do not use `importlib-metadata==3.8` in dependencies as it causes ``RuntimeError``. Ref: https://github.com/python/importlib_metadata/issues/293

3.5.2

Not secure
:version:`3.5.2 <v3.5.1...v3.5.2>` - 2021-03-24
-----------------------------------------------

**Changed**

- Prefix worker thread names with ``schemathesis_``.

3.5.1

Not secure
:version:`3.5.1 <v3.5.0...v3.5.1>` - 2021-03-23
-----------------------------------------------

**Fixed**

- Encoding for response payloads displayed in the CLI output. :issue:`1073`
- Use actual charset (from ``flask.Response.mimetype_params``) when storing WSGI responses rather than defaulting to ``flask.Response.charset``.

3.5.0

Not secure
:version:`3.5.0 <v3.4.1...v3.5.0>` - 2021-03-22
-----------------------------------------------

**Added**

- ``before_generate_case`` hook, that allows the user to modify or filter generated ``Case`` instances. :issue:`1067`

**Fixed**

- Missing ``body`` parameters during Open API links processing in CLI. :issue:`1069`
- Output types for evaluation results of ``$response.body`` and ``$request.body`` runtime expressions. :issue:`1068`

3.4.1

Not secure
:version:`3.4.1 <v3.4.0...v3.4.1>` - 2021-03-21
-----------------------------------------------

**Added**

- ``event_type`` field to the debug output.

Page 28 of 51

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.