Restore tests to pass on Python 2.7