'Test handling an event from LiteJet.'

def test_deactivated_event(self):

    self.mock_lj.get_load_level.return_value = 99
    self.load_activated_callbacks[ENTITY_OTHER_LIGHT_NUMBER]()
    self.hass.block_till_done()
    assert light.is_on(self.hass, ENTITY_OTHER_LIGHT)
    self.mock_lj.get_load_level.reset_mock()
    self.mock_lj.get_load_level.return_value = 0
    self.load_deactivated_callbacks[ENTITY_OTHER_LIGHT_NUMBER]()
    self.hass.block_till_done()
    self.mock_lj.get_load_level.assert_called_with(ENTITY_OTHER_LIGHT_NUMBER)
    assert (not light.is_on(self.hass, ENTITY_OTHER_LIGHT))
    assert (not light.is_on(self.hass, ENTITY_LIGHT))
    assert (self.light().state == 'off')
    assert (self.other_light().state == 'off')
