tests: fix a timestamp race in python tests