Title: #5517: [Backport][ipa-4-9] ipatests: use pexpect for controlling interactive
command line utilities
This is a manual backport of #5460.
Link to pagure ticket was added to commit messages.
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/5517/head:pr5517
git checkout pr5517