Remove tests for deprecated key (#31491)

This commit is contained in:
Paulus Schoutsen 2020-02-05 09:00:20 -08:00 committed by GitHub
parent 67680bcfa8
commit 84cbcb4d16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"