Fixed close connection issue with rfxtrx device and update rfxtrx lib
This commit is contained in:
1 parent
399fda079f
commit
d6344d6492
6 files changed
+15
-18
No files matched your search
@@ -5,12 +5,9 @@ from homeassistant.components import rfxtrx as rfxtrx_core
|
||||
from homeassistant.components.light import rfxtrx
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
from tests.common import get_test_home_assistant
|
||||
|
||||
|
||||
@pytest.mark.skipif(True, reason='Does not clean up properly, takes 100% CPU')
|
||||
class TestLightRfxtrx(unittest.TestCase):
|
||||
"""Test the Rfxtrx light platform."""
|
||||
|
||||
@@ -22,6 +19,8 @@ class TestLightRfxtrx(unittest.TestCase):
|
||||
"""Stop everything that was started."""
|
||||
rfxtrx_core.RECEIVED_EVT_SUBSCRIBERS = []
|
||||
rfxtrx_core.RFX_DEVICES = {}
|
||||
if rfxtrx_core.RFXOBJECT:
|
||||
rfxtrx_core.RFXOBJECT.close_connection()
|
||||
self.hass.stop()
|
||||
|
||||
def test_default_config(self):
|
||||
|
||||
@@ -5,12 +5,9 @@ from homeassistant.components import rfxtrx as rfxtrx_core
|
||||
from homeassistant.components.switch import rfxtrx
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
from tests.common import get_test_home_assistant
|
||||
|
||||
|
||||
@pytest.mark.skipif(True, reason='Does not clean up properly, takes 100% CPU')
|
||||
class TestSwitchRfxtrx(unittest.TestCase):
|
||||
"""Test the Rfxtrx switch platform."""
|
||||
|
||||
@@ -22,6 +19,8 @@ class TestSwitchRfxtrx(unittest.TestCase):
|
||||
"""Stop everything that was started."""
|
||||
rfxtrx_core.RECEIVED_EVT_SUBSCRIBERS = []
|
||||
rfxtrx_core.RFX_DEVICES = {}
|
||||
if rfxtrx_core.RFXOBJECT:
|
||||
rfxtrx_core.RFXOBJECT.close_connection()
|
||||
self.hass.stop()
|
||||
|
||||
def test_default_config(self):
|
||||
|
||||
@@ -6,12 +6,9 @@ import time
|
||||
from homeassistant.components import rfxtrx as rfxtrx
|
||||
from homeassistant.components.sensor import rfxtrx as rfxtrx_sensor
|
||||
|
||||
import pytest
|
||||
|
||||
from tests.common import get_test_home_assistant
|
||||
|
||||
|
||||
@pytest.mark.skipif(True, reason='Does not clean up properly, takes 100% CPU')
|
||||
class TestRFXTRX(unittest.TestCase):
|
||||
"""Test the Rfxtrx component."""
|
||||
|
||||
@@ -23,7 +20,8 @@ class TestRFXTRX(unittest.TestCase):
|
||||
"""Stop everything that was started."""
|
||||
rfxtrx.RECEIVED_EVT_SUBSCRIBERS = []
|
||||
rfxtrx.RFX_DEVICES = {}
|
||||
rfxtrx.RFXOBJECT = None
|
||||
if rfxtrx.RFXOBJECT:
|
||||
rfxtrx.RFXOBJECT.close_connection()
|
||||
self.hass.stop()
|
||||
|
||||
def test_default_config(self):
|
||||
|
||||
Reference in new issue
Block a user