py3: py3 throws FileNotFoundError, not IOError
py3: has_key was removed in py3
py3: don't use unicode in tests
py3: don't use basestring in tests