Fix some Python unit tests