Fix a test broken by a change to randrange in Python 2.7.6