mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Remove YAML config from Ring integration (#32039)
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
"""The tests for the Ring component."""
|
||||
from asyncio import run_coroutine_threadsafe
|
||||
from copy import deepcopy
|
||||
from datetime import timedelta
|
||||
import unittest
|
||||
|
||||
import requests_mock
|
||||
|
||||
from homeassistant import setup
|
||||
import homeassistant.components.ring as ring
|
||||
|
||||
from tests.common import get_test_home_assistant, load_fixture
|
||||
@@ -57,25 +55,3 @@ class TestRing(unittest.TestCase):
|
||||
).result()
|
||||
|
||||
assert response
|
||||
|
||||
@requests_mock.Mocker()
|
||||
def test_setup_component_no_login(self, mock):
|
||||
"""Test the setup when no login is configured."""
|
||||
mock.post(
|
||||
"https://api.ring.com/clients_api/session",
|
||||
text=load_fixture("ring_session.json"),
|
||||
)
|
||||
conf = deepcopy(VALID_CONFIG)
|
||||
del conf["ring"]["username"]
|
||||
assert not setup.setup_component(self.hass, ring.DOMAIN, conf)
|
||||
|
||||
@requests_mock.Mocker()
|
||||
def test_setup_component_no_pwd(self, mock):
|
||||
"""Test the setup when no password is configured."""
|
||||
mock.post(
|
||||
"https://api.ring.com/clients_api/session",
|
||||
text=load_fixture("ring_session.json"),
|
||||
)
|
||||
conf = deepcopy(VALID_CONFIG)
|
||||
del conf["ring"]["password"]
|
||||
assert not setup.setup_component(self.hass, ring.DOMAIN, conf)
|
||||
|
||||
Reference in New Issue
Block a user