def test_encode_short_string_utf8_python3(self): self.assertEqual(encode.short_string('🐰'), b'\x04\xf0\x9f\x90\xb0')
def test_encode_short_string(self): self.assertEqual(encode.short_string('Hello'), b'\x05Hello')
def test_encode_short_string_utf8_python3(self): self.assertEqual(encode.short_string('🐰'), b'\x04\xf0\x9f\x90\xb0')
def test_encode_short_string_utf8_python2(self): self.assertEqual( encode.short_string('\xf0\x9f\x90\xb0'.decode('utf-8')), b'\x04\xf0\x9f\x90\xb0')
def test_encode_short_string(self): self.assertEqual(encode.short_string('Hello'), b'\x05Hello')
def test_encode_short_string_utf8_python2(self): self.assertEqual( encode.short_string('\xf0\x9f\x90\xb0'.decode('utf-8')), b'\x04\xf0\x9f\x90\xb0')