'"Testing valid refresh.'

@patch('requests.get', side_effect=mocked_requests)
@patch('requests.post', side_effect=mocked_requests)
def test_valid_credential(self, mock_get, mock_post):

    config = {DOMAIN: xiaomi.PLATFORM_SCHEMA({CONF_PLATFORM: xiaomi.DOMAIN, CONF_HOST: '192.168.0.1', CONF_USERNAME: 'admin', CONF_PASSWORD: 'passwordTest'})}
    scanner = get_scanner(self.hass, config)
    self.assertIsNotNone(scanner)
    self.assertEqual(2, len(scanner.scan_devices()))
    self.assertEqual('Device1', scanner.get_device_name('23:83:BF:F6:38:A0'))
    self.assertEqual('Device2', scanner.get_device_name('1D:98:EC:5E:D5:A6'))
