mockdock
mockdock is a dns resolver and http server usable for testing
containers.
mockdock can be used with the --dns argument for docker run. It can be set to resolve all dns requests to itself, thereby
constituting a mock server for all dns-based http requests of the
container under test.
The integration_test module under the tests directory serves as
practical documentation of how mockdock can be used in a test
scenario with a docker container.
format
Responses to http requests are specified as json in the format
{
"domain.tld/path": {
"data": "response data",
"content-type": "text/plain",
"code": 200
},
"domain.tld/path2": {
"code": 500
}
}
All elements in the structure are optional with the missing elements
defaulting to the values set by the HttpResponse class in the
mockdock.server module.
The response data can be passed to the server directly in the
CONFIG_DATA variable or in a file with the path passed in
the CONFIG_PATH variable. The two variables are mutually
exclusive, so they cannot both be specified at the same time.
Metadata
Release files for mockdock 0.8.1
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 | Actions |
|---|---|---|---|---|
| mockdock-0.8.1.tar.gz | 5.1 kB | Without provenance | Details for mockdock-0.8.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mockdock-0.8.1-py3-none-any.whl | Python 3 | none | any | Details for mockdock-0.8.1-py3-none-any.whl |
Total release size: 11.9 kB
Release files / mockdock-0.8.1.tar.gz
| Download URL | mockdock-0.8.1.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8866a4a9e0fb0b9f083498b0d6b74216d4973ae8196382aa0e4ee4703db0f67
|
|
BLAKE2b-256 checksum How to use checksums |
c3fcaa082ede618f8b2dba761078dcbb2283fb3bb3d60adb759cf66d76af4dfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.8
|
Release files / mockdock-0.8.1-py3-none-any.whl
| Download URL | mockdock-0.8.1-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23796c6c1dc702446037d3e7a3102dcfa03bba8db38d05803a4203f3d87e9b55
|
|
BLAKE2b-256 checksum How to use checksums |
c8953443a5567ae0f01466fd819898f342478938d35eef33cfa72a1cb4758fda
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.8
|
Security for mockdock 0.8.1
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.