'Test different ways of passing in variables.'

def test_passing_variables(self):

    calls = []
    @callback
    def record_call(service):
        'Add    recorded    event    to    set.'
        calls.append(service)
    self.hass.services.register('test', 'script', record_call)
    assert setup_component(self.hass, 'script', {'script': {'test': {'sequence': {'service': 'test.script', 'data_template': {'hello': '{{    greeting    }}'}}}}})
    script.turn_on(self.hass, ENTITY_ID, {'greeting': 'world'})
    self.hass.block_till_done()
    assert (len(calls) == 1)
    assert (calls[(-1)].data['hello'] == 'world')
    self.hass.services.call('script', 'test', {'greeting': 'universe'})
    self.hass.block_till_done()
    assert (len(calls) == 2)
    assert (calls[(-1)].data['hello'] == 'universe')
