fix tests on 2.7+