Use HTTP_NOT_FOUND constant (#33835)
This commit is contained in:
1 parent
ac9429988b
commit
9a40d5b7ed
29 files changed
+98
-78
No files matched your search
@@ -6,6 +6,7 @@ import pytest
|
||||
|
||||
from homeassistant.components import alexa
|
||||
from homeassistant.components.alexa import const
|
||||
from homeassistant.const import HTTP_NOT_FOUND
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
@@ -69,7 +70,7 @@ def _flash_briefing_req(client, briefing_id):
|
||||
async def test_flash_briefing_invalid_id(alexa_client):
|
||||
"""Test an invalid Flash Briefing ID."""
|
||||
req = await _flash_briefing_req(alexa_client, 10000)
|
||||
assert req.status == 404
|
||||
assert req.status == HTTP_NOT_FOUND
|
||||
text = await req.text()
|
||||
assert text == ""
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import json
|
||||
|
||||
from homeassistant.components.alexa import DOMAIN, smart_home_http
|
||||
from homeassistant.const import HTTP_NOT_FOUND
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from . import get_new_request
|
||||
@@ -38,4 +39,4 @@ async def test_http_api_disabled(hass, hass_client):
|
||||
config = {"alexa": {}}
|
||||
response = await do_http_discovery(config, hass, hass_client)
|
||||
|
||||
assert response.status == 404
|
||||
assert response.status == HTTP_NOT_FOUND
|
||||
Reference in new issue
Block a user