Reducing tests due to py 3 errors.
Fixing python 3 error around function codes