mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-14 12:46:32 +00:00
Fix suggestion test to be order agnostic (#3822)
This commit is contained in:
parent
7b63544474
commit
2c5bb3f714
@ -153,7 +153,14 @@ async def test_api_resolution_suggestions_for_issue(coresys: CoreSys, api_client
|
|||||||
resp = await api_client.get(f"/resolution/issue/{corrupt_repo.uuid}/suggestions")
|
resp = await api_client.get(f"/resolution/issue/{corrupt_repo.uuid}/suggestions")
|
||||||
result = await resp.json()
|
result = await resp.json()
|
||||||
|
|
||||||
assert result["data"]["suggestions"][0]["uuid"] == execute_reset.uuid
|
suggestion = [
|
||||||
assert result["data"]["suggestions"][0]["auto"] is True
|
su for su in result["data"]["suggestions"] if su["uuid"] == execute_reset.uuid
|
||||||
assert result["data"]["suggestions"][1]["uuid"] == execute_remove.uuid
|
]
|
||||||
assert result["data"]["suggestions"][1]["auto"] is False
|
assert bool(suggestion)
|
||||||
|
assert suggestion[0]["auto"] is True
|
||||||
|
|
||||||
|
suggestion = [
|
||||||
|
su for su in result["data"]["suggestions"] if su["uuid"] == execute_remove.uuid
|
||||||
|
]
|
||||||
|
assert bool(suggestion)
|
||||||
|
assert suggestion[0]["auto"] is False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user