This commit is an example of converting a Java unit test to a Python unit test: http://cgit.freedesktop.org/libreoffice/core/commit/?id=3c0a9bb59ed19b2f4492defd84d023c5e169d777 Maybe that will help.