Python 2 to 3 fix.
Fixed DeprecationWarning errors in tests.