idnow_responses
A third-party pytest plugin that provides a fixture to mock the IdNow identification service.
Installation
pip install idnow-responses
Usage
This plugin makes the idnow_responses fixture available. Typically the request
to IdNow would be within the tested code and not within the test. For
simplicity, it's here in the request:
import requests
import idnow_responses
idnow_responses.company_id = "Mandala"
def test_service(idnow_responses):
company_id = "Mandala"
# Create ident
url = f"https://gateway.test.idnow.de/api/v1/{company_id}/identifications/foo-123-ab/start"
response = requests.post(url)
assert response.status_code == 200
assert response.json() == {"id": "foo-123-ab"}
# Get ident
url = (
f"https://gateway.test.idnow.de/api/v1/{company_id}/identifications/foo-123-ab"
)
response = requests.get(url)
assert response.status_code == 200
assert response.json() == {"id": "foo-123-ab"}
# Get unknown ident
url = f"https://gateway.test.idnow.de/api/v1/{company_id}/identifications/unknown-tx-id"
response = requests.get(url)
assert response.status_code == 404
assert response.json() == {"errors": [{"cause": "OBJECT_NOT_FOUND"}]}
Metadata
Release files for idnow-responses 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| idnow_responses-0.0.2.tar.gz | 3.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| idnow_responses-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.4 kB
Release files / idnow_responses-0.0.2.tar.gz
| Download URL | idnow_responses-0.0.2.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4002b98a15c079b2be3a93715cee47e1a94cb051421b41e6535a53891949309a
|
|
BLAKE2b-256 checksum How to use checksums |
5f1eb6f32dc2465eecb7317acb9fbb5ede960faae8352b4e2f9929915b94b093
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.20.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / idnow_responses-0.0.2-py3-none-any.whl
| Download URL | idnow_responses-0.0.2-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d637e96b66ecd3efb5a5c4a8623267a9f2d9e1fb050249a72acff2504860e15f
|
|
BLAKE2b-256 checksum How to use checksums |
37b74cede0e090d7c61e9d35e92a88d83689dcb0011466e7bd9e7f3d0fbfe200
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.20.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Security for idnow-responses 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.