Test the result with issues getting the ratelimit.
(
hacs: HacsBase,
snapshots: SnapshotFixture,
response_mocker: ResponseMocker,
)
| 31 | |
| 32 | |
| 33 | async def test_diagnostics_with_exception( |
| 34 | hacs: HacsBase, |
| 35 | snapshots: SnapshotFixture, |
| 36 | response_mocker: ResponseMocker, |
| 37 | ): |
| 38 | """Test the result with issues getting the ratelimit.""" |
| 39 | response_mocker.add( |
| 40 | "https://api.github.com/rate_limit", |
| 41 | MockedResponse(status=400, content="Something went wrong"), |
| 42 | ) |
| 43 | diagnostics = await async_get_config_entry_diagnostics( |
| 44 | hacs.hass, |
| 45 | hacs.configuration.config_entry, |
| 46 | ) |
| 47 | |
| 48 | snapshots.assert_match( |
| 49 | safe_json_dumps(recursive_remove_key(diagnostics, REMOVE_KEYS)), |
| 50 | "diagnostics/exception.json", |
| 51 | ) |
nothing calls this directly
no test coverage detected
searching dependent graphs…