fix unit test for py3, str, & unicode