Fix unittest for python < 2.7