'Test service call with tempating.'

def test_template_service_call(self):

    config = {'service_template': "{{    'test_domain.test_service'    }}", 'entity_id': 'hello.world', 'data_template': {'hello': "{{    'goodbye'    }}", 'data': {'value': "{{    'complex'    }}", 'simple': 'simple'}, 'list': ["{{    'list'    }}", '2']}}
    service.call_from_config(self.hass, config)
    self.hass.block_till_done()
    self.assertEqual('goodbye', self.calls[0].data['hello'])
    self.assertEqual('complex', self.calls[0].data['data']['value'])
    self.assertEqual('simple', self.calls[0].data['data']['simple'])
    self.assertEqual('list', self.calls[0].data['list'][0])
