'Test if platform validation was done.'

def test_ensure_device_tracker_platform_validation(self):

    @asyncio.coroutine
    def mock_setup_scanner(hass, config, see, discovery_info=None):
        'Check    that    Qos    was    added    by    validation.'
        self.assertTrue(('qos' in config))
    with patch('homeassistant.components.device_tracker.mqtt.async_setup_scanner', autospec=True, side_effect=mock_setup_scanner) as mock_sp:
        dev_id = 'paulus'
        topic = '/location/paulus'
        assert setup_component(self.hass, device_tracker.DOMAIN, {device_tracker.DOMAIN: {CONF_PLATFORM: 'mqtt', 'devices': {dev_id: topic}}})
        assert (mock_sp.call_count == 1)
