Replace randint() by 0 (aka ANY_PORT) in the unit tests (#664)