Improve recorder type hints in tests (#87826)

* Improve recorder type hints in tests

* Add comment

* Adjust comment
This commit is contained in:
epenet
2023-02-10 11:11:39 +01:00
committed by GitHub
parent b5dfd83c46
commit fac746c974
3 changed files with 59 additions and 30 deletions

View File

@@ -94,17 +94,24 @@ _TEST_FIXTURES: dict[str, list[str] | str] = {
"aioclient_mock": "AiohttpClientMocker",
"aiohttp_client": "ClientSessionGenerator",
"area_registry": "AreaRegistry",
"async_setup_recorder_instance": "RecorderInstanceGenerator",
"caplog": "pytest.LogCaptureFixture",
"device_registry": "DeviceRegistry",
"enable_nightly_purge": "bool",
"enable_statistics": "bool",
"enable_statistics_table_validation": "bool",
"entity_registry": "EntityRegistry",
"hass_client": "ClientSessionGenerator",
"hass_client_no_auth": "ClientSessionGenerator",
"hass_recorder": "Callable[..., HomeAssistant]",
"hass_ws_client": "WebSocketGenerator",
"issue_registry": "IssueRegistry",
"mqtt_client_mock": "MqttMockPahoClient",
"mqtt_mock": "MqttMockHAClient",
"mqtt_mock_entry_no_yaml_config": "MqttMockHAClientGenerator",
"mqtt_mock_entry_with_yaml_config": "MqttMockHAClientGenerator",
"recorder_db_url": "str",
"recorder_mock": "Recorder",
}
_TEST_FUNCTION_MATCH = TypeHintMatch(
function_name="test_*",