Browse Source

Fix namespace in unit tests.

Because this component uses a different namespace than the upstream, the tests also need updating.
Jason Rumney 5 years ago
parent
commit
aa798cc801

+ 3 - 3
tests/dehumidifier/test_climate.py

@@ -16,8 +16,8 @@ from homeassistant.components.climate.const import (
 )
 from homeassistant.const import ATTR_TEMPERATURE, STATE_UNAVAILABLE
 
-from custom_components.goldair_climate.dehumidifier.climate import GoldairDehumidifier
-from custom_components.goldair_climate.dehumidifier.const import (
+from custom_components.tuya_local.dehumidifier.climate import GoldairDehumidifier
+from custom_components.tuya_local.dehumidifier.const import (
     ATTR_AIR_CLEAN_ON,
     ATTR_DEFROSTING,
     ATTR_ERROR,
@@ -42,7 +42,7 @@ from ..helpers import assert_device_properties_set
 class TestGoldairDehumidifier(IsolatedAsyncioTestCase):
     def setUp(self):
         device_patcher = patch(
-            "custom_components.goldair_climate.device.GoldairTuyaDevice"
+            "custom_components.tuya_local.device.GoldairTuyaDevice"
         )
         self.addCleanup(device_patcher.stop)
         self.mock_device = device_patcher.start()

+ 3 - 3
tests/dehumidifier/test_light.py

@@ -1,12 +1,12 @@
 from unittest import IsolatedAsyncioTestCase
 from unittest.mock import AsyncMock, patch
 
-from custom_components.goldair_climate.dehumidifier.const import (
+from custom_components.tuya_local.dehumidifier.const import (
     ATTR_DISPLAY_ON,
     ATTR_HVAC_MODE,
     PROPERTY_TO_DPS_ID,
 )
-from custom_components.goldair_climate.dehumidifier.light import (
+from custom_components.tuya_local.dehumidifier.light import (
     GoldairDehumidifierLedDisplayLight,
 )
 
@@ -17,7 +17,7 @@ from ..helpers import assert_device_properties_set
 class TestGoldairDehumidifierLedDisplayLight(IsolatedAsyncioTestCase):
     def setUp(self):
         device_patcher = patch(
-            "custom_components.goldair_climate.device.GoldairTuyaDevice"
+            "custom_components.tuya_local.device.GoldairTuyaDevice"
         )
         self.addCleanup(device_patcher.stop)
         self.mock_device = device_patcher.start()

+ 3 - 3
tests/dehumidifier/test_lock.py

@@ -4,12 +4,12 @@ from unittest.mock import AsyncMock, patch
 from homeassistant.components.lock import STATE_LOCKED, STATE_UNLOCKED
 from homeassistant.const import STATE_UNAVAILABLE
 
-from custom_components.goldair_climate.dehumidifier.const import (
+from custom_components.tuya_local.dehumidifier.const import (
     ATTR_CHILD_LOCK,
     ATTR_HVAC_MODE,
     PROPERTY_TO_DPS_ID,
 )
-from custom_components.goldair_climate.dehumidifier.lock import (
+from custom_components.tuya_local.dehumidifier.lock import (
     GoldairDehumidifierChildLock,
 )
 
@@ -20,7 +20,7 @@ from ..helpers import assert_device_properties_set
 class TestGoldairDehumidifierChildLock(IsolatedAsyncioTestCase):
     def setUp(self):
         device_patcher = patch(
-            "custom_components.goldair_climate.device.GoldairTuyaDevice"
+            "custom_components.tuya_local.device.GoldairTuyaDevice"
         )
         self.addCleanup(device_patcher.stop)
         self.mock_device = device_patcher.start()

+ 3 - 3
tests/fan/test_climate.py

@@ -18,8 +18,8 @@ from homeassistant.components.climate.const import (
 )
 from homeassistant.const import ATTR_TEMPERATURE, STATE_UNAVAILABLE
 
-from custom_components.goldair_climate.fan.climate import GoldairFan
-from custom_components.goldair_climate.fan.const import (
+from custom_components.tuya_local.fan.climate import GoldairFan
+from custom_components.tuya_local.fan.const import (
     FAN_MODES,
     HVAC_MODE_TO_DPS_MODE,
     PRESET_MODE_TO_DPS_MODE,
@@ -35,7 +35,7 @@ from ..helpers import assert_device_properties_set
 class TestGoldairFan(IsolatedAsyncioTestCase):
     def setUp(self):
         device_patcher = patch(
-            "custom_components.goldair_climate.device.GoldairTuyaDevice"
+            "custom_components.tuya_local.device.GoldairTuyaDevice"
         )
         self.addCleanup(device_patcher.stop)
         self.mock_device = device_patcher.start()

+ 3 - 3
tests/fan/test_light.py

@@ -1,12 +1,12 @@
 from unittest import IsolatedAsyncioTestCase
 from unittest.mock import AsyncMock, patch
 
-from custom_components.goldair_climate.fan.const import (
+from custom_components.tuya_local.fan.const import (
     ATTR_DISPLAY_ON,
     ATTR_HVAC_MODE,
     PROPERTY_TO_DPS_ID,
 )
-from custom_components.goldair_climate.fan.light import GoldairFanLedDisplayLight
+from custom_components.tuya_local.fan.light import GoldairFanLedDisplayLight
 
 from ..const import FAN_PAYLOAD
 from ..helpers import assert_device_properties_set
@@ -15,7 +15,7 @@ from ..helpers import assert_device_properties_set
 class TestGoldairFanLedDisplayLight(IsolatedAsyncioTestCase):
     def setUp(self):
         device_patcher = patch(
-            "custom_components.goldair_climate.device.GoldairTuyaDevice"
+            "custom_components.tuya_local.device.GoldairTuyaDevice"
         )
         self.addCleanup(device_patcher.stop)
         self.mock_device = device_patcher.start()

+ 3 - 3
tests/geco_heater/test_climate.py

@@ -10,8 +10,8 @@ from homeassistant.components.climate.const import (
 )
 from homeassistant.const import ATTR_TEMPERATURE, STATE_UNAVAILABLE
 
-from custom_components.goldair_climate.geco_heater.climate import GoldairGECOHeater
-from custom_components.goldair_climate.geco_heater.const import (
+from custom_components.tuya_local.geco_heater.climate import GoldairGECOHeater
+from custom_components.tuya_local.geco_heater.const import (
     ATTR_ERROR,
     ATTR_TARGET_TEMPERATURE,
     HVAC_MODE_TO_DPS_MODE,
@@ -25,7 +25,7 @@ from ..helpers import assert_device_properties_set
 class TestGoldairGECOHeater(IsolatedAsyncioTestCase):
     def setUp(self):
         device_patcher = patch(
-            "custom_components.goldair_climate.device.GoldairTuyaDevice"
+            "custom_components.tuya_local.device.GoldairTuyaDevice"
         )
         self.addCleanup(device_patcher.stop)
         self.mock_device = device_patcher.start()

+ 3 - 3
tests/geco_heater/test_lock.py

@@ -4,12 +4,12 @@ from unittest.mock import AsyncMock, patch
 from homeassistant.components.lock import STATE_LOCKED, STATE_UNLOCKED
 from homeassistant.const import STATE_UNAVAILABLE
 
-from custom_components.goldair_climate.geco_heater.const import (
+from custom_components.tuya_local.geco_heater.const import (
     ATTR_CHILD_LOCK,
     ATTR_HVAC_MODE,
     PROPERTY_TO_DPS_ID,
 )
-from custom_components.goldair_climate.geco_heater.lock import (
+from custom_components.tuya_local.geco_heater.lock import (
     GoldairGECOHeaterChildLock,
 )
 
@@ -20,7 +20,7 @@ from ..helpers import assert_device_properties_set
 class TestGoldairGECOHeaterChildLock(IsolatedAsyncioTestCase):
     def setUp(self):
         device_patcher = patch(
-            "custom_components.goldair_climate.device.GoldairTuyaDevice"
+            "custom_components.tuya_local.device.GoldairTuyaDevice"
         )
         self.addCleanup(device_patcher.stop)
         self.mock_device = device_patcher.start()

+ 3 - 3
tests/gpcv_heater/test_climate.py

@@ -11,8 +11,8 @@ from homeassistant.components.climate.const import (
 )
 from homeassistant.const import ATTR_TEMPERATURE, STATE_UNAVAILABLE
 
-from custom_components.goldair_climate.gpcv_heater.climate import GoldairGPCVHeater
-from custom_components.goldair_climate.gpcv_heater.const import (
+from custom_components.tuya_local.gpcv_heater.climate import GoldairGPCVHeater
+from custom_components.tuya_local.gpcv_heater.const import (
     ATTR_ERROR,
     ATTR_TARGET_TEMPERATURE,
     HVAC_MODE_TO_DPS_MODE,
@@ -29,7 +29,7 @@ from ..helpers import assert_device_properties_set
 class TestGoldairGPCVHeater(IsolatedAsyncioTestCase):
     def setUp(self):
         device_patcher = patch(
-            "custom_components.goldair_climate.device.GoldairTuyaDevice"
+            "custom_components.tuya_local.device.GoldairTuyaDevice"
         )
         self.addCleanup(device_patcher.stop)
         self.mock_device = device_patcher.start()

+ 3 - 3
tests/gpcv_heater/test_lock.py

@@ -4,12 +4,12 @@ from unittest.mock import AsyncMock, patch
 from homeassistant.components.lock import STATE_LOCKED, STATE_UNLOCKED
 from homeassistant.const import STATE_UNAVAILABLE
 
-from custom_components.goldair_climate.gpcv_heater.const import (
+from custom_components.tuya_local.gpcv_heater.const import (
     ATTR_CHILD_LOCK,
     ATTR_HVAC_MODE,
     PROPERTY_TO_DPS_ID,
 )
-from custom_components.goldair_climate.gpcv_heater.lock import (
+from custom_components.tuya_local.gpcv_heater.lock import (
     GoldairGPCVHeaterChildLock,
 )
 
@@ -20,7 +20,7 @@ from ..helpers import assert_device_properties_set
 class TestGoldairGPCVHeaterChildLock(IsolatedAsyncioTestCase):
     def setUp(self):
         device_patcher = patch(
-            "custom_components.goldair_climate.device.GoldairTuyaDevice"
+            "custom_components.tuya_local.device.GoldairTuyaDevice"
         )
         self.addCleanup(device_patcher.stop)
         self.mock_device = device_patcher.start()

+ 3 - 3
tests/heater/test_climate.py

@@ -12,8 +12,8 @@ from homeassistant.components.climate.const import (
 )
 from homeassistant.const import ATTR_TEMPERATURE, STATE_UNAVAILABLE
 
-from custom_components.goldair_climate.heater.climate import GoldairHeater
-from custom_components.goldair_climate.heater.const import (
+from custom_components.tuya_local.heater.climate import GoldairHeater
+from custom_components.tuya_local.heater.const import (
     ATTR_ECO_TARGET_TEMPERATURE,
     ATTR_ERROR,
     ATTR_POWER_LEVEL,
@@ -39,7 +39,7 @@ from ..helpers import assert_device_properties_set
 class TestGoldairHeater(IsolatedAsyncioTestCase):
     def setUp(self):
         device_patcher = patch(
-            "custom_components.goldair_climate.device.GoldairTuyaDevice"
+            "custom_components.tuya_local.device.GoldairTuyaDevice"
         )
         self.addCleanup(device_patcher.stop)
         self.mock_device = device_patcher.start()

+ 3 - 3
tests/heater/test_light.py

@@ -1,12 +1,12 @@
 from unittest import IsolatedAsyncioTestCase
 from unittest.mock import AsyncMock, patch
 
-from custom_components.goldair_climate.heater.const import (
+from custom_components.tuya_local.heater.const import (
     ATTR_DISPLAY_ON,
     ATTR_HVAC_MODE,
     PROPERTY_TO_DPS_ID,
 )
-from custom_components.goldair_climate.heater.light import GoldairHeaterLedDisplayLight
+from custom_components.tuya_local.heater.light import GoldairHeaterLedDisplayLight
 
 from ..const import GPPH_HEATER_PAYLOAD
 from ..helpers import assert_device_properties_set
@@ -15,7 +15,7 @@ from ..helpers import assert_device_properties_set
 class TestGoldairHeaterLedDisplayLight(IsolatedAsyncioTestCase):
     def setUp(self):
         device_patcher = patch(
-            "custom_components.goldair_climate.device.GoldairTuyaDevice"
+            "custom_components.tuya_local.device.GoldairTuyaDevice"
         )
         self.addCleanup(device_patcher.stop)
         self.mock_device = device_patcher.start()

+ 3 - 3
tests/heater/test_lock.py

@@ -4,12 +4,12 @@ from unittest.mock import AsyncMock, patch
 from homeassistant.components.lock import STATE_LOCKED, STATE_UNLOCKED
 from homeassistant.const import STATE_UNAVAILABLE
 
-from custom_components.goldair_climate.heater.const import (
+from custom_components.tuya_local.heater.const import (
     ATTR_CHILD_LOCK,
     ATTR_HVAC_MODE,
     PROPERTY_TO_DPS_ID,
 )
-from custom_components.goldair_climate.heater.lock import GoldairHeaterChildLock
+from custom_components.tuya_local.heater.lock import GoldairHeaterChildLock
 
 from ..const import GPPH_HEATER_PAYLOAD
 from ..helpers import assert_device_properties_set
@@ -18,7 +18,7 @@ from ..helpers import assert_device_properties_set
 class TestGoldairHeaterChildLock(IsolatedAsyncioTestCase):
     def setUp(self):
         device_patcher = patch(
-            "custom_components.goldair_climate.device.GoldairTuyaDevice"
+            "custom_components.tuya_local.device.GoldairTuyaDevice"
         )
         self.addCleanup(device_patcher.stop)
         self.mock_device = device_patcher.start()