mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-24 20:35:55 +00:00
Fix no changelog API response (#5064)
* Fix no changelog API response * Add comment reasoning HTTP 200 for no changelog Co-authored-by: Stefan Agner <stefan@agner.ch> * Apply suggestions from code review Co-authored-by: Jan Čermák <sairon@users.noreply.github.com> --------- Co-authored-by: Jan Čermák <sairon@users.noreply.github.com> Co-authored-by: Stefan Agner <stefan@agner.ch>
This commit is contained in:
@@ -188,3 +188,18 @@ async def test_api_store_update_healthcheck(
|
||||
assert resp.status == 200
|
||||
|
||||
await _container_events_task
|
||||
|
||||
|
||||
@pytest.mark.parametrize("resource", ["store/addons", "addons"])
|
||||
async def test_api_store_addons_no_changelog(
|
||||
api_client: TestClient, coresys: CoreSys, store_addon: AddonStore, resource: str
|
||||
):
|
||||
"""Test /store/addons/{addon}/changelog REST API.
|
||||
|
||||
Currently the frontend expects a valid body even in the error case. Make sure that is
|
||||
what the API returns.
|
||||
"""
|
||||
resp = await api_client.get(f"/{resource}/{store_addon.slug}/changelog")
|
||||
assert resp.status == 200
|
||||
result = await resp.text()
|
||||
assert result == "No changelog found for add-on test_store_addon!"
|
||||
|
||||
Reference in New Issue
Block a user