MCPcopy Index your code
hub / github.com/python-websockets/websockets / Rot13

Class Rot13

tests/test_frames.py:174–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172
173 def test_extensions(self):
174 class Rot13:
175 @staticmethod
176 def encode(frame):
177 assert frame.opcode == OP_TEXT
178 text = frame.data.decode()
179 data = codecs.encode(text, "rot13").encode()
180 return dataclasses.replace(frame, data=data)
181
182 # This extensions is symmetrical.
183 @staticmethod
184 def decode(frame, *, max_size=None):
185 return Rot13.encode(frame)
186
187 self.assertFrameData(
188 Frame(OP_TEXT, b"hello"),

Callers 1

test_extensionsMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_extensionsMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…