MCPcopy
hub / github.com/PostHog/posthog / test_readyz_supports_excluding_checks

Function test_readyz_supports_excluding_checks

posthog/test/test_health.py:32–40  ·  view source on GitHub ↗
(client: Client)

Source from the content-addressed store, hash-verified

30
31@pytest.mark.django_db
32def test_readyz_supports_excluding_checks(client: Client):
33 with simulate_postgres_error():
34 resp = get_readyz(client, exclude=["postgres", "postgres_migrations_uptodate"])
35
36 assert resp.status_code == 200, resp.content
37 data = resp.json()
38 assert {
39 check: status for check, status in data.items() if check in {"postgres", "postgres_migrations_uptodate"}
40 } == {"postgres": False, "postgres_migrations_uptodate": False}
41
42
43def test_livez_returns_200_and_doesnt_require_any_dependencies(client: Client):

Callers

nothing calls this directly

Calls 3

get_readyzFunction · 0.85
jsonMethod · 0.80
simulate_postgres_errorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…