fix unit test
make unit test more stable for different $HOME vars
Differential Revision: https://phabricator.kde.org/D21861