tests: Restore python3 compatibility

In python3, range returns a range object, in python2, a list. Force it
into a list for the purpose of the tests.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>