Assertions
hospital provides a set of assertions for use in health checks.
HTTP
Assertions around HTTP resources.
-
hospital.assertions.http.assert_http_response(url, status_code=200, timeout=1)
Assert that GET url returns status_code within timeout.
Networking
Assertions related to networking.
-
hospital.assertions.networking.assert_ping(host, timeout=1)
Assert host responds to ping within timeout.
Packaging
Assertions related to Python packaging.
-
hospital.assertions.packaging.assert_supported_python_version(distribution, version=None)
Assert that distribution claims support for Python version.
- distribution
- Distribution object, as returned by pkg_resources.get_distribution().
- version
- Python version, as a string. If omitted or None (the default), the
current Python version is retrieved from sys.version_info.