MCPcopy Create free account
hub / github.com/aws/aws-cli / test_percent_encode_bytes

Method test_percent_encode_bytes

tests/unit/botocore/test_utils.py:1516–1523  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1514 self.assertEqual(percent_encode('\U0001f32e'), '%F0%9F%8C%AE')
1515
1516 def test_percent_encode_bytes(self):
1517 self.assertEqual(percent_encode(b''), '')
1518 self.assertEqual(percent_encode(b'a'), 'a')
1519 self.assertEqual(percent_encode(b'\x00'), '%00')
1520 # UTF-8 Snowman
1521 self.assertEqual(percent_encode(b'\xe2\x98\x83'), '%E2%98%83')
1522 # Arbitrary bytes (not valid UTF-8).
1523 self.assertEqual(percent_encode(b'\x80\x00'), '%80%00')
1524
1525
1526class TestSwitchHostS3Accelerate(unittest.TestCase):

Callers

nothing calls this directly

Calls 1

percent_encodeFunction · 0.90

Tested by

no test coverage detected