Python 3 support
Fix deprecation warnings

assertEquals -> assertEqual