Use remove_device helper in tests (1/2) (#116240)
* Use remove_device helper in tests * Update test_tag.py * Update test_tag.py
This commit is contained in:
parent
a3942e019b
commit
ad84ff18eb
13 changed files with 29 additions and 171 deletions
|
@ -634,15 +634,7 @@ async def test_remove_config_entry_device(
|
|||
assert hass.states.get(entity_id)
|
||||
|
||||
client = await hass_ws_client(hass)
|
||||
await client.send_json(
|
||||
{
|
||||
"id": 5,
|
||||
"type": "config/device_registry/remove_config_entry",
|
||||
"config_entry_id": config_entry.entry_id,
|
||||
"device_id": device_entry.id,
|
||||
}
|
||||
)
|
||||
response = await client.receive_json()
|
||||
response = await client.remove_device(device_entry.id, config_entry.entry_id)
|
||||
assert response["success"]
|
||||
await hass.async_block_till_done()
|
||||
|
||||
|
@ -671,15 +663,7 @@ async def test_remove_config_entry_device_no_node(
|
|||
)
|
||||
|
||||
client = await hass_ws_client(hass)
|
||||
await client.send_json(
|
||||
{
|
||||
"id": 5,
|
||||
"type": "config/device_registry/remove_config_entry",
|
||||
"config_entry_id": config_entry.entry_id,
|
||||
"device_id": device_entry.id,
|
||||
}
|
||||
)
|
||||
response = await client.receive_json()
|
||||
response = await client.remove_device(device_entry.id, config_entry.entry_id)
|
||||
assert response["success"]
|
||||
await hass.async_block_till_done()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue