Fix Python functional test