'Test setup with all data.'

@MockDependency('datadog', 'beer')
def test_datadog_setup_full(self, mock_datadog):

    self.hass.bus.listen = mock.MagicMock()
    mock_connection = mock_datadog.initialize
    assert setup_component(self.hass, datadog.DOMAIN, {datadog.DOMAIN: {'host': 'host', 'port': 123, 'rate': 1, 'prefix': 'foo'}})
    self.assertEqual(mock_connection.call_count, 1)
    self.assertEqual(mock_connection.call_args, mock.call(statsd_host='host', statsd_port=123))
    self.assertTrue(self.hass.bus.listen.called)
    self.assertEqual(EVENT_LOGBOOK_ENTRY, self.hass.bus.listen.call_args_list[0][0][0])
    self.assertEqual(EVENT_STATE_CHANGED, self.hass.bus.listen.call_args_list[1][0][0])
