Fix python unit tests