Fix python 2 tests