'Test that login is done with password when configured to.'

def test_ssh_login_with_password(self):

    ssh = mock.MagicMock()
    ssh_mock = mock.patch('pexpect.pxssh.pxssh', return_value=ssh)
    ssh_mock.start()
    self.addCleanup(ssh_mock.stop)
    conf_dict = PLATFORM_SCHEMA({CONF_PLATFORM: 'asuswrt', CONF_HOST: 'fake_host', CONF_USERNAME: 'fake_user', CONF_PASSWORD: 'fake_pass'})
    update_mock = mock.patch('homeassistant.components.device_tracker.asuswrt.AsusWrtDeviceScanner.get_asuswrt_data')
    update_mock.start()
    self.addCleanup(update_mock.stop)
    asuswrt = device_tracker.asuswrt.AsusWrtDeviceScanner(conf_dict)
    asuswrt.connection.get_result()
    self.assertEqual(ssh.login.call_count, 1)
    self.assertEqual(ssh.login.call_args, mock.call('fake_host', 'fake_user', password='fake_pass', port=22))
