tests.test_status moduleΒΆ

Tests for repomatic.github.status.

The probe fetches through repomatic.http.get_json(), so the network seam is repomatic.http.urlopen.

tests.test_status.test_healthy_status_parsed()[source]ΒΆ

A healthy indicator returns a non-incident GitHubStatus.

tests.test_status.test_incident_status_parsed(indicator)[source]ΒΆ

Any non-none indicator surfaces as an incident.

tests.test_status.test_unusable_response_returns_none(patch_kwargs)[source]ΒΆ

Every unusable response collapses to None rather than raising.

The probe is advisory: it annotates a failure message with GitHub’s own incident state, so anything it cannot read has to degrade quietly instead of turning a diagnostic into a second failure.

tests.test_status.test_get_github_status_is_memoized()[source]ΒΆ

Repeat calls within one process probe the network once.

tests.test_status.test_status_annotation_empty_when_unreachable()[source]ΒΆ

The annotation helper returns an empty string when the probe fails.

tests.test_status.test_status_annotation_empty_when_healthy()[source]ΒΆ

The annotation helper returns empty when GitHub reports healthy.

tests.test_status.test_status_annotation_populated_when_incident()[source]ΒΆ

The annotation helper renders the incident summary when not healthy.

tests.test_status.test_suite_never_reaches_the_probe_by_default()[source]ΒΆ

A caller of with_status_annotation sends no request from the suite.

The _no_status_probe fixture of tests/conftest.py holds this, so a test module needs no patch of its own to keep a failed gh call off githubstatus.com.