Upgrade Ring to new version (#30666)
* Upgrade Ring to new version * Move legacy cleanup down * Fix test
This commit is contained in:
1 parent
86bdba2ea2
commit
718f3438ea
16 files changed
+121
-123
No files matched your search
@@ -2,7 +2,6 @@
|
||||
from asyncio import run_coroutine_threadsafe
|
||||
from copy import deepcopy
|
||||
from datetime import timedelta
|
||||
import os
|
||||
import unittest
|
||||
|
||||
import requests_mock
|
||||
@@ -10,7 +9,7 @@ import requests_mock
|
||||
from homeassistant import setup
|
||||
import homeassistant.components.ring as ring
|
||||
|
||||
from tests.common import get_test_config_dir, get_test_home_assistant, load_fixture
|
||||
from tests.common import get_test_home_assistant, load_fixture
|
||||
|
||||
ATTRIBUTION = "Data provided by Ring.com"
|
||||
|
||||
@@ -22,21 +21,14 @@ VALID_CONFIG = {
|
||||
class TestRing(unittest.TestCase):
|
||||
"""Tests the Ring component."""
|
||||
|
||||
def cleanup(self):
|
||||
"""Cleanup any data created from the tests."""
|
||||
if os.path.isfile(self.cache):
|
||||
os.remove(self.cache)
|
||||
|
||||
def setUp(self):
|
||||
"""Initialize values for this test case class."""
|
||||
self.hass = get_test_home_assistant()
|
||||
self.cache = get_test_config_dir(ring.DEFAULT_CACHEDB)
|
||||
self.config = VALID_CONFIG
|
||||
|
||||
def tearDown(self): # pylint: disable=invalid-name
|
||||
"""Stop everything that was started."""
|
||||
self.hass.stop()
|
||||
self.cleanup()
|
||||
|
||||
@requests_mock.Mocker()
|
||||
def test_setup(self, mock):
|
||||
|
||||
Reference in new issue
Block a user