Use the boolean variable `testtools.compat.str_is_unicode`, which will only be true in Python 3.