MCPcopy Create free account
hub / github.com/mozilla/cipherscan / test_parse

Method test_parse

cscan_tests/test_extensions.py:49–61  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

47 self.assertEqual(data, bytearray(b'\x00\x2a\x00\x00'))
48
49 def test_parse(self):
50 parser = Parser(bytearray(
51 #b'\x00\x2a\x00\x0d'
52 b'\x00\x0b'
53 b'\x00\x17\x02\xff\xfa'
54 b'\x01\x00\x00\x02\xaf\xaa'))
55
56 ext = KeyShareExtension()
57 ext.parse(parser)
58
59 self.assertEqual(ext.client_shares,
60 [(GroupName.secp256r1, bytearray(b'\xff\xfa')),
61 (GroupName.ffdhe2048, bytearray(b'\xaf\xaa'))])
62
63 def test_parse_with_no_data(self):
64 parser = Parser(bytearray())

Callers

nothing calls this directly

Calls 2

parseMethod · 0.95
KeyShareExtensionClass · 0.90

Tested by

no test coverage detected