Extensions for using inline-snapshot to test Django projects.
Project description
Extensions for using inline-snapshot to test Django projects.
A quick example:
from django.test import TestCase
from inline_snapshot import snapshot
from inline_snapshot_django import snapshot_queries
class IndexTests(TestCase):
def test_success(self):
with snapshot_queries() as snap:
response = self.client.get("/")
assert snap == snapshot(
[
"SELECT ... FROM auth_user WHERE ...",
"SELECT ... FROM example_character WHERE ...",
]
)
inline-snapshot will automatically capture and update the contents of snapshot(), allowing you to quickly write and maintain tests that demonstrate the structure of your queries.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file inline_snapshot_django-1.0.0.tar.gz.
File metadata
- Download URL: inline_snapshot_django-1.0.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c87b1784cc849bde6d3127b52a5fda9a254702846ac2ab7ddb82d362a5b9589
|
|
| MD5 |
71aca6fa1ef9570f825c6d01605a50e5
|
|
| BLAKE2b-256 |
c1985c7f2befc510ac64041249e1b544a7bb0aacd89a062028fba38e5ef48d0b
|
Provenance
The following attestation bundles were made for inline_snapshot_django-1.0.0.tar.gz:
Publisher:
main.yml on adamchainz/inline-snapshot-django
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
inline_snapshot_django-1.0.0.tar.gz -
Subject digest:
4c87b1784cc849bde6d3127b52a5fda9a254702846ac2ab7ddb82d362a5b9589 - Sigstore transparency entry: 228794557
- Sigstore integration time:
-
Permalink:
adamchainz/inline-snapshot-django@a87fa99e7009b7ff0aaeea6ffe5dab3f198d0eae -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/adamchainz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@a87fa99e7009b7ff0aaeea6ffe5dab3f198d0eae -
Trigger Event:
push
-
Statement type:
File details
Details for the file inline_snapshot_django-1.0.0-py3-none-any.whl.
File metadata
- Download URL: inline_snapshot_django-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c3a72871201e0ab27b832211fc7fef9bc14c8f3a225e8584a408c682ede78d2
|
|
| MD5 |
c1796e1efa39c7b208e48359a4cdbe90
|
|
| BLAKE2b-256 |
1caccac60a811261203dbe2e28f017ac85410326a5747ad23f3b0a27e52c856a
|
Provenance
The following attestation bundles were made for inline_snapshot_django-1.0.0-py3-none-any.whl:
Publisher:
main.yml on adamchainz/inline-snapshot-django
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
inline_snapshot_django-1.0.0-py3-none-any.whl -
Subject digest:
1c3a72871201e0ab27b832211fc7fef9bc14c8f3a225e8584a408c682ede78d2 - Sigstore transparency entry: 228794572
- Sigstore integration time:
-
Permalink:
adamchainz/inline-snapshot-django@a87fa99e7009b7ff0aaeea6ffe5dab3f198d0eae -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/adamchainz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@a87fa99e7009b7ff0aaeea6ffe5dab3f198d0eae -
Trigger Event:
push
-
Statement type: