Upgrade Ring to new version (#30666)

* Upgrade Ring to new version

* Move legacy cleanup down

* Fix test
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2020-01-11 16:04:39 -08:00
1 parent 4972b249bf
commit 7073b0eb88
16 files changed
+121 -123

No files matched your search

+1 -9
View File
@@ -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):