def METHOD_NAME(self):
    text_1 = astring.to_text(b"\xc3\xa1", "utf-8")
    text_2 = astring.to_text("\u00e1", "utf-8")
    self.assertTrue(astring.is_text(text_1))
    self.assertEqual(text_1, text_2)
    self.assertEqual(astring.to_text(Exception("\u00e1")), "\xe1")
    # For tuple, dict and others astring.to_text is equivalent of str()
    # because on py3 it's unicode and on py2 it uses __repr__ (is encoded)
    self.assertEqual(astring.to_text({"\xe1": 1}), str({"\xe1": 1}))