def test_service_schema():
 options = ({}, None, {'service': 'homeassistant.turn_on', 'service_template': 'homeassistant.turn_on'}, {'data': {'entity_id': 'light.kitchen'}}, {'service': 'homeassistant.turn_on', 'data': None}, {'service': 'homeassistant.turn_on', 'data_template': {'brightness': '{{ no_end'}})
 for value in options:
  with pytest.raises(vol.MultipleInvalid):
   cv.SERVICE_SCHEMA(value)
 options = ({'service': 'homeassistant.turn_on'}, {'service': 'homeassistant.turn_on', 'entity_id': 'light.kitchen'}, {'service': 'homeassistant.turn_on', 'entity_id': ['light.kitchen', 'light.ceiling']})
 for value in options:
  cv.SERVICE_SCHEMA(value)

def test_service_schema ( ) : options = ( { } , None , { 'service' : 'homeassistant.turn_on' , 'service_template' : 'homeassistant.turn_on' } , { 'data' : { 'entity_id' : 'light.kitchen' } } , { 'service' : 'homeassistant.turn_on' , 'data' : None } , { 'service' : 'homeassistant.turn_on' , 'data_template' : { 'brightness' : '{{ no_end' } } ) for value in options : with pytest . raises ( vol . MultipleInvalid ) : cv . SERVICE_SCHEMA ( value ) options = ( { 'service' : 'homeassistant.turn_on' } , { 'service' : 'homeassistant.turn_on' , 'entity_id' : 'light.kitchen' } , { 'service' : 'homeassistant.turn_on' , 'entity_id' : [ 'light.kitchen' , 'light.ceiling' ] } ) for value in options : cv . SERVICE_SCHEMA ( value )
test service_schema validation .