mirror of
https://github.com/home-assistant/core.git
synced 2025-12-26 22:18:40 +00:00
add_devices -> add_entities (#16171)
* add_devices -> add_entities * Lint * PyLint * Revert external method in scsgate
This commit is contained in:
@@ -26,7 +26,7 @@ class TestVultrSwitchSetup(unittest.TestCase):
|
||||
|
||||
DEVICES = []
|
||||
|
||||
def add_devices(self, devices, action):
|
||||
def add_entities(self, devices, action):
|
||||
"""Mock add devices."""
|
||||
for device in devices:
|
||||
self.DEVICES.append(device)
|
||||
@@ -71,7 +71,7 @@ class TestVultrSwitchSetup(unittest.TestCase):
|
||||
for config in self.configs:
|
||||
vultr.setup_platform(self.hass,
|
||||
config,
|
||||
self.add_devices,
|
||||
self.add_entities,
|
||||
None)
|
||||
|
||||
self.assertEqual(len(self.DEVICES), 3)
|
||||
@@ -181,7 +181,7 @@ class TestVultrSwitchSetup(unittest.TestCase):
|
||||
|
||||
no_subs_setup = vultr.setup_platform(self.hass,
|
||||
bad_conf,
|
||||
self.add_devices,
|
||||
self.add_entities,
|
||||
None)
|
||||
|
||||
self.assertIsNotNone(no_subs_setup)
|
||||
@@ -193,7 +193,7 @@ class TestVultrSwitchSetup(unittest.TestCase):
|
||||
|
||||
wrong_subs_setup = vultr.setup_platform(self.hass,
|
||||
bad_conf,
|
||||
self.add_devices,
|
||||
self.add_entities,
|
||||
None)
|
||||
|
||||
self.assertIsNotNone(wrong_subs_setup)
|
||||
|
||||
Reference in New Issue
Block a user