Testing toolbox for blacksmith
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42ac3cd7d96e3fbe84e6f000e80984ca9933b8d1fec83a538e8792829ba6a9b3 |
|
MD5 | 29555fedd09dfe799fe4054951dea16a |
|
BLAKE2b-256 | 61615cc0d0ede684d043bf3ad94862dea1b4a27c4fc578e7f5101bf34db14be6 |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24a03da39243a5c852da35465014a7f4edb2406cde08660e83573046158e3229 |
|
MD5 | 5861c5caf22c84c80620412e2d65fc4f |
|
BLAKE2b-256 | e71d9048d0fb15eeb8386ec3a6ae8acb0714ca5962685d02c06cc058aba2f0ce |