'Test Python API fire_event.'

def test_fire_event(self):

    test_value = []
    @ha.callback
    def listener(event):
        'Helper    method    that    will    verify    our    event    got    called.'
        test_value.append(1)
    hass.bus.listen('test.event_no_data', listener)
    remote.fire_event(master_api, 'test.event_no_data')
    hass.block_till_done()
    self.assertEqual(1, len(test_value))
    remote.fire_event(broken_api, 'test.event_no_data')
