Improve error handling process_play_media_url (#68322)

This commit is contained in:
Paulus Schoutsen 2022-03-20 20:25:15 -07:00 committed by GitHub
parent ed94cc3673
commit 929df2bc29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 59 additions and 21 deletions

View file

@ -681,6 +681,9 @@ async def test_is_hass_url(hass):
assert hass.config.external_url is None
assert is_hass_url(hass, "http://example.com") is False
assert is_hass_url(hass, "bad_url") is False
assert is_hass_url(hass, "bad_url.com") is False
assert is_hass_url(hass, "http:/bad_url.com") is False
hass.config.api = Mock(use_ssl=False, port=8123, local_ip="192.168.123.123")
assert is_hass_url(hass, "http://192.168.123.123:8123") is True