'Test the setup with no configuration.'

@mock.patch('homeassistant.components.binary_sensor.nx584.NX584Watcher')
@mock.patch('homeassistant.components.binary_sensor.nx584.NX584ZoneSensor')
def test_setup_defaults(self, mock_nx, mock_watcher):

    add_devices = mock.MagicMock()
    config = {'host': nx584.DEFAULT_HOST, 'port': nx584.DEFAULT_PORT, 'exclude_zones': [], 'zone_types': {}}
    self.assertTrue(nx584.setup_platform(self.hass, config, add_devices))
    mock_nx.assert_has_calls([mock.call(zone, 'opening') for zone in self.fake_zones])
    self.assertTrue(add_devices.called)
    self.assertEqual(nx584_client.Client.call_count, 1)
    self.assertEqual(nx584_client.Client.call_args, mock.call('http://localhost:5007'))
