tests: Fix iterate script