Skip to main content

Testing toolbox for blacksmith

Project description

Test helper for blacksmith resources.

Continuous Integration

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-4.0.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

whitesmith-4.0.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file whitesmith-4.0.0.tar.gz.

File metadata

  • Download URL: whitesmith-4.0.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.19.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for whitesmith-4.0.0.tar.gz
Algorithm Hash digest
SHA256 42ac3cd7d96e3fbe84e6f000e80984ca9933b8d1fec83a538e8792829ba6a9b3
MD5 29555fedd09dfe799fe4054951dea16a
BLAKE2b-256 61615cc0d0ede684d043bf3ad94862dea1b4a27c4fc578e7f5101bf34db14be6

See more details on using hashes here.

File details

Details for the file whitesmith-4.0.0-py3-none-any.whl.

File metadata

  • Download URL: whitesmith-4.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.19.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for whitesmith-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24a03da39243a5c852da35465014a7f4edb2406cde08660e83573046158e3229
MD5 5861c5caf22c84c80620412e2d65fc4f
BLAKE2b-256 e71d9048d0fb15eeb8386ec3a6ae8acb0714ca5962685d02c06cc058aba2f0ce

See more details on using hashes here.

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