'Test the processing of zone events.'

@mock.patch.object(nx584.NX584ZoneSensor, 'schedule_update_ha_state')
def test_process_zone_event(self, mock_update):

    zone1 = {'number': 1, 'name': 'foo', 'state': True}
    zone2 = {'number': 2, 'name': 'bar', 'state': True}
    zones = {1: nx584.NX584ZoneSensor(zone1, 'motion'), 2: nx584.NX584ZoneSensor(zone2, 'motion')}
    watcher = nx584.NX584Watcher(None, zones)
    watcher._process_zone_event({'zone': 1, 'zone_state': False})
    self.assertFalse(zone1['state'])
    self.assertEqual(1, mock_update.call_count)
