Add and use HTTP_FORBIDDEN constant (#33839)

This commit is contained in:
springstan 2020-04-09 17:41:17 +02:00 committed by GitHub
parent 70ee9d7f26
commit bc26be3c11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 60 additions and 37 deletions

View file

@ -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"}}