Python 2.x compatibility issue in tests

assertCountEqual is available only in Python 3