def test_utf8dict(self): d = {u"følelser ær langé": u"ærbadægzaååÆØÅ", "foobar".encode("utf-8"): "xuzzybaz".encode("utf-8")} for key, value in http.utf8dict(d.items()).items(): self.assertTrue(isinstance(key, str)) self.assertTrue(isinstance(value, str))
def test_utf8dict(self): uk = "foobar" d = {"følelser ær langé": "ærbadægzaååÆØÅ", from_utf8(uk): from_utf8("xuzzybaz")} for key, value in items(http.utf8dict(items(d))): self.assertIsInstance(key, str) self.assertIsInstance(value, str)
def test_utf8dict(self): uk = 'foobar' d = {'følelser ær langé': 'ærbadægzaååÆØÅ', from_utf8(uk): from_utf8('xuzzybaz')} for key, value in items(http.utf8dict(items(d))): self.assertIsInstance(key, str) self.assertIsInstance(value, str)
def test_utf8dict(self): uk = "foobar" d = {u"følelser ær langé": u"ærbadægzaååÆØÅ", from_utf8(uk): from_utf8("xuzzybaz")} for key, value in http.utf8dict(d.items()).items(): self.assertIsInstance(key, str) self.assertIsInstance(value, str)
def test_utf8dict(self): d = { u"følelser ær langé": u"ærbadægzaååÆØÅ", "foobar".encode("utf-8"): "xuzzybaz".encode("utf-8") } for key, value in http.utf8dict(d.items()).items(): self.assertIsInstance(key, str) self.assertIsInstance(value, str)