fix test_rabbit for Python 3

Replace range() with list(range()), range() returns a read-only "range" object
in Python 3.

Change-Id: If92e60b426ccbba574e63e1603cc3d7507df6c98
Merge "fix test_rabbit for Python 3"