mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Remove tests for deprecated key (#31491)
This commit is contained in:
parent
67680bcfa8
commit
84cbcb4d16
@ -145,38 +145,6 @@ async def test_call_homegraph_api_retry(hass, aioclient_mock, hass_storage):
|
||||
assert call[3] == MOCK_HEADER
|
||||
|
||||
|
||||
async def test_call_homegraph_api_key(hass, aioclient_mock, hass_storage):
|
||||
"""Test the function to call the homegraph api."""
|
||||
config = GoogleConfig(
|
||||
hass, GOOGLE_ASSISTANT_SCHEMA({"project_id": "1234", "api_key": "dummy_key"}),
|
||||
)
|
||||
await config.async_initialize()
|
||||
|
||||
aioclient_mock.post(MOCK_URL, status=200, json={})
|
||||
|
||||
res = await config.async_call_homegraph_api_key(MOCK_URL, MOCK_JSON)
|
||||
assert res == 200
|
||||
assert aioclient_mock.call_count == 1
|
||||
|
||||
call = aioclient_mock.mock_calls[0]
|
||||
assert call[1].query == {"key": "dummy_key"}
|
||||
assert call[2] == MOCK_JSON
|
||||
|
||||
|
||||
async def test_call_homegraph_api_key_fail(hass, aioclient_mock, hass_storage):
|
||||
"""Test the function to call the homegraph api."""
|
||||
config = GoogleConfig(
|
||||
hass, GOOGLE_ASSISTANT_SCHEMA({"project_id": "1234", "api_key": "dummy_key"}),
|
||||
)
|
||||
await config.async_initialize()
|
||||
|
||||
aioclient_mock.post(MOCK_URL, status=666, json={})
|
||||
|
||||
res = await config.async_call_homegraph_api_key(MOCK_URL, MOCK_JSON)
|
||||
assert res == 666
|
||||
assert aioclient_mock.call_count == 1
|
||||
|
||||
|
||||
async def test_report_state(hass, aioclient_mock, hass_storage):
|
||||
"""Test the report state function."""
|
||||
agent_user_id = "user"
|
||||
|
Loading…
x
Reference in New Issue
Block a user