Fix unittest for Python 2