def test_bad_template(self):
    'Test passing bad template.'
    config = {'service_template': '{{ var_service }}', 'entity_id': 'hello.world', 'data_template': {'hello': '{{ states + unknown_var }}'}}
    service.call_from_config(self.hass, config, variables={'var_service': 'test_domain.test_service', 'var_data': 'goodbye'})
    self.hass.block_till_done()
    self.assertEqual(len(self.calls), 0)
Test passing bad template.
def test_bad_template(self):
    
    config = {'service_template': '{{ var_service }}', 'entity_id': 'hello.world', 'data_template': {'hello': '{{ states + unknown_var }}'}}
    service.call_from_config(self.hass, config, variables={'var_service': 'test_domain.test_service', 'var_data': 'goodbye'})
    self.hass.block_till_done()
    self.assertEqual(len(self.calls), 0)