'Test Python API services.call.'

def test_call_service(self):

    test_value = []
    @ha.callback
    def listener(service_call):
        'Helper    method    that    will    verify    that    our    service    got    called.'
        test_value.append(1)
    hass.services.register('test_domain', 'test_service', listener)
    remote.call_service(master_api, 'test_domain', 'test_service')
    hass.block_till_done()
    self.assertEqual(1, len(test_value))
    remote.call_service(broken_api, 'test_domain', 'test_service')
