Add and use HTTP_FORBIDDEN constant (#33839)
This commit is contained in:
parent
70ee9d7f26
commit
bc26be3c11
15 changed files with 60 additions and 37 deletions
|
@ -8,6 +8,7 @@ from homeassistant.components.media_player.const import (
|
|||
SERVICE_PLAY_MEDIA,
|
||||
)
|
||||
import homeassistant.components.tts as tts
|
||||
from homeassistant.const import HTTP_FORBIDDEN
|
||||
from homeassistant.setup import setup_component
|
||||
|
||||
from tests.common import assert_setup_component, get_test_home_assistant, mock_service
|
||||
|
@ -198,7 +199,7 @@ class TestTTSYandexPlatform:
|
|||
"speed": 1,
|
||||
}
|
||||
aioclient_mock.get(
|
||||
self._base_url, status=403, content=b"test", params=url_param
|
||||
self._base_url, status=HTTP_FORBIDDEN, content=b"test", params=url_param
|
||||
)
|
||||
|
||||
config = {tts.DOMAIN: {"platform": "yandextts", "api_key": "1234567xx"}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue