def test_returns_a_string_if_passed_bytes(self): entry = 'Toto'.encode('utf-8') value = encode_header(entry) self.assertEqual(type(value), str)
def test_returns_a_string_if_passed_unicode(self): entry = u'Rémy' value = encode_header(entry) self.assertEqual(type(value), str)
def test_encode_str_return_str(self): value = 'Toto' self.assertEqual(type(value), str) value = encode_header(value) self.assertEqual(type(value), str)