pymacaron-unit
Python library for unittesting json REST apis built with pymacaron, including support for JWT authentication, Error formats used by pymacaron and compatible with 'pymtest', the testing tool used in pymacaron microservices.
Synopsis
from pymacaron_unit.testcase import PyMacaronTestCase
class Tests(PyMacaronTestCase):
def setUp(self):
super.setUp()
self.host = 'api.fixer.io'
self.port = 80
def test_make_some_calls(self):
# Test that GET returns a json structure
j = self.assertGetReturnJson(
"v1/hello",
)
# Same, with setting the Authorization http header to a JWT token
j = self.assertGetReturnJson(
"v1/hello",
auth="Bearer %s" % self.token
)
# Do a POST
j = self.assertPostReturnJson(
"v1/hello",
{
'foo': 'bar',
}
)
See pymacaron_unit/testcase.py for a complete list of test methods.
Examples
See test/test_unit.py :-)
Author
Erwan Lemonnier
github.com/pymacaron
github.com/erwan-lemonnier
www.linkedin.com/in/erwan-lemonnier/
Metadata
Release files for pymacaron-unit 1.0.20
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 |
|---|---|---|---|---|
| pymacaron-unit-1.0.20.tar.gz | 5.2 kB | Without provenance | Details for pymacaron-unit-1.0.20.tar.gz |
Release files / pymacaron-unit-1.0.20.tar.gz
| Download URL | pymacaron-unit-1.0.20.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bbe296e6000fbb623b8d8657dadfad58b60a8a26e55f71c908ac27b38c7de6b4
|
|
BLAKE2b-256 checksum How to use checksums |
df0881dda4daa8491db23b5858a7c7ccd9f54ab0bff5848d60630bbcf77315a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.5.9
|
Security for pymacaron-unit 1.0.20
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.