JJ: fixed all tests for python3