MCPcopy Index your code
hub / github.com/shadowsocks/shadowsocks / test_parse_header

Function test_parse_header

shadowsocks/common.py:266–273  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

264
265
266def test_parse_header():
267 assert parse_header(b'\x03\x0ewww.google.com\x00\x50') == \
268 (3, b'www.google.com', 80, 18)
269 assert parse_header(b'\x01\x08\x08\x08\x08\x00\x35') == \
270 (1, b'8.8.8.8', 53, 7)
271 assert parse_header((b'\x04$\x04h\x00@\x05\x08\x05\x00\x00\x00\x00\x00'
272 b'\x00\x10\x11\x00\x50')) == \
273 (4, b'2404:6800:4005:805::1011', 80, 19)
274
275
276def test_pack_header():

Callers 1

common.pyFile · 0.85

Calls 1

parse_headerFunction · 0.70

Tested by

no test coverage detected