@mock.patch('homeassistant.components.binary_sensor.nx584.NX584Watcher')
    @mock.patch('homeassistant.components.binary_sensor.nx584.NX584ZoneSensor')
    def test_setup_full_config(self, mock_nx, mock_watcher):
        config = {
            'host': 'foo:123',
            'exclude_zones': [2],
            'zone_types': {3: 'motion'},
            }
        add_devices = mock.MagicMock()
        hass = mock.MagicMock()
        self.assertTrue(nx584.setup_platform(hass, config, add_devices))
        mock_nx.assert_has_calls([
            mock.call(self.fake_zones[0], 'opening'),
            mock.call(self.fake_zones[2], 'motion'),
            ])
        self.assertTrue(add_devices.called)
        nx584_client.Client.assert_called_once_with('http://foo:123')
        self.assertTrue(mock_watcher.called)
Test the setup with full configuration.
dataset/ETHPy150Open home-assistant/home-assistant/tests/components/binary_sensor/test_nx584.py/TestNX584SensorSetup.test_setup_full_config