'Testing full configuration.'

@mock.patch('homeassistant.components.device_tracker.xiaomi.XiaomiDeviceScanner', return_value=mock.MagicMock())
def test_config_full(self, xiaomi_mock):

    config = {DOMAIN: xiaomi.PLATFORM_SCHEMA({CONF_PLATFORM: xiaomi.DOMAIN, CONF_HOST: '192.168.0.1', CONF_USERNAME: 'alternativeAdminName', CONF_PASSWORD: 'passwordTest'})}
    xiaomi.get_scanner(self.hass, config)
    self.assertEqual(xiaomi_mock.call_count, 1)
    self.assertEqual(xiaomi_mock.call_args, mock.call(config[DOMAIN]))
    call_arg = xiaomi_mock.call_args[0][0]
    self.assertEqual(call_arg['username'], 'alternativeAdminName')
    self.assertEqual(call_arg['password'], 'passwordTest')
    self.assertEqual(call_arg['host'], '192.168.0.1')
    self.assertEqual(call_arg['platform'], 'device_tracker')
