MCPcopy Create free account
hub / github.com/rthalley/dnspython / test_svcb_mandatory

Method test_svcb_mandatory

tests/test_svcb.py:42–80  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

40 self.check_invalid_inputs(invalid_inputs)
41
42 def test_svcb_mandatory(self):
43 valid_inputs = (
44 '1 . mandatory="alpn,no-default-alpn" alpn="h2" no-default-alpn',
45 "1 . mandatory=alpn,no-default-alpn alpn=h2 no-default-alpn",
46 "1 . mandatory=key1,key2 alpn=h2 no-default-alpn",
47 "1 . mandatory=alpn,no-default-alpn key1=\\002h2 key2",
48 "1 . key0=\\000\\001\\000\\002 alpn=h2 no-default-alpn",
49 "1 . alpn=h2 no-default-alpn mandatory=alpn,no-default-alpn",
50 )
51 self.check_valid_inputs(valid_inputs)
52
53 invalid_inputs = (
54 # empty
55 "1 . mandatory=",
56 "1 . mandatory",
57 # unknown key
58 "1 . mandatory=foo",
59 # key 0
60 "1 . mandatory=key0",
61 "1 . mandatory=key0,alpn",
62 # missing key
63 "1 . mandatory=alpn",
64 # duplicate
65 "1 . mandatory=alpn,alpn alpn=h2",
66 # invalid escaping
67 "1 . mandatory=\\alpn alpn=h2",
68 # empty wire format
69 "1 . key0",
70 "1 . key0=",
71 # 0 in wire format
72 "1 . key0=\\000\\000",
73 # invalid length in wire format
74 "1 . key0=\\000",
75 # out of order in wire format
76 "1 . key0=\\000\\002\\000\\001 alpn=h2 no-default-alpn",
77 # leading zeros
78 "1 . mandatory=key1,key002 alpn=h2 no-default-alpn",
79 )
80 self.check_invalid_inputs(invalid_inputs)
81
82 def test_svcb_alpn(self):
83 valid_inputs_two_items = (

Callers

nothing calls this directly

Calls 2

check_valid_inputsMethod · 0.95
check_invalid_inputsMethod · 0.95

Tested by

no test coverage detected