'Test the usage of YAML aliases and anchors.
The following test scene configuration is equivalent to:
scene:
- name: test
entities:
light_1: &light_1_state
state: \'on\'
brightness: 100
light_2: *light_1_state
When encountering a YAML alias/anchor, the PyYAML parser will use a
reference to the original dictionary, instead of creating a copy, so
care needs to be taken to not modify the original.'

def test_config_yaml_alias_anchor(self):

    entity_state = {'state': 'on', 'brightness': 100}
    self.assertTrue(setup_component(self.hass, scene.DOMAIN, {'scene': [{'name': 'test', 'entities': {self.light_1.entity_id: entity_state, self.light_2.entity_id: entity_state}}]}))
    scene.activate(self.hass, 'scene.test')
    self.hass.block_till_done()
    self.assertTrue(self.light_1.is_on)
    self.assertTrue(self.light_2.is_on)
    self.assertEqual(100, self.light_1.last_call('turn_on')[1].get('brightness'))
    self.assertEqual(100, self.light_2.last_call('turn_on')[1].get('brightness'))
