fix tests for python 2.6

list.index has a different native error message in 2.6 and 2.7