def test_platform_setup(self):
        config = {'name': 'test', 'platform': 'universal'}
        bad_config = {'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, bad_config, add_devices)
        self.assertEqual(0, len(entities))

        universal.setup_platform(self.hass, config, add_devices)
        self.assertEqual(1, len(entities))
        self.assertEqual('test', entities[0].name)
Assert that a child of the given Page type can be created under the
dataset/ETHPy150Open home-assistant/home-assistant/tests/components/media_player/test_universal.py/TestMediaPlayer.test_platform_setup--crossover with--dataset/ETHPy150Open torchbox/wagtail/wagtail/tests/utils.py/WagtailPageTests.assertCanCreate