Fix python unit tests.