Fixed test that can brake randomly on Python 3.x