def test_platform_setup(self): """ test platform setup """ config = {"name": "test", "platform": "universal"} entities = [] def add_devices(new_entities): """ add devices to list """ for dev in new_entities: entities.append(dev) universal.setup_platform(self.hass, config, add_devices) self.assertEqual(1, len(entities)) self.assertEqual("test", entities[0].name)
def test_platform_setup(self): """ test platform setup """ config = {'name': 'test', 'platform': 'universal'} entities = [] def add_devices(new_entities): """ add devices to list """ for dev in new_entities: entities.append(dev) universal.setup_platform(self.hass, config, add_devices) self.assertEqual(1, len(entities)) self.assertEqual('test', entities[0].name)
def test_platform_setup(self): """ test platform setup """ config = {'name': 'test', 'platform': 'universal'} entities = [] def add_devices(new_entities): """ add devices to list """ for dev in new_entities: entities.append(dev) universal.setup_platform(self.hass, config, add_devices) self.assertEqual(1, len(entities)) self.assertEqual('test', entities[0].name)