Exemplo n.º 1
0
    def test_bad_ipv6_prefix_length(self):
        S46DMROption.parse(
            bytes.fromhex('005b00118020010db8000000000000000000000001'))

        with self.assertRaisesRegex(ValueError, 'range from 0 to 128'):
            S46DMROption.parse(
                bytes.fromhex('005b00118120010db800000000000000000000000100'))
Exemplo n.º 2
0
    def test_bad_ipv6_prefix_length(self):
        S46DMROption.parse(bytes.fromhex('005b00118020010db8000000000000000000000001'))

        with self.assertRaisesRegex(ValueError, 'range from 0 to 128'):
            S46DMROption.parse(
                bytes.fromhex('005b00118120010db800000000000000000000000100')
            )
Exemplo n.º 3
0
 def test_bad_option_length(self):
     with self.assertRaisesRegex(ValueError, 'length does not match'):
         S46DMROption.parse(
             bytes.fromhex('005b00112020010db8000000000000000000000000'))
Exemplo n.º 4
0
 def test_bad_option_length(self):
     with self.assertRaisesRegex(ValueError, 'length does not match'):
         S46DMROption.parse(
             bytes.fromhex('005b00112020010db8000000000000000000000000')
         )