Fix failing tests without deps or not on Python 2.7