Skip to main content

Toolbox for blacksmithsmith

Project description

Test helper for blacksmith resources.

Motivation

While using blacksmith, resources are declared using pydantic, and, while testing, we never do http calls.

Whitesmith is a helper that create pytest fixtures for blacksmith resources and generate handlers for tests.

Usage

whitesmith generate -m my_package.resources --out-dir tests/

The commande above will generate a folder tests/whitesmith containing handlers for all the api call with a default implementation.

The command will generate also a conftest.py file containing two fixtures,

for sync and async version.

Tests that require those fixture are suppose to be created inside the whitesmith folder.

To create the test elsewhere, you have to copy create your own fixtures by copy, pasting and adapting import path.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

whitesmith-0.5.0.tar.gz (6.8 kB view hashes)

Uploaded Source

Built Distribution

whitesmith-0.5.0-py3-none-any.whl (8.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page