示例#1
0
 def test_with_exts(self):
     inst = SCIONExtPacket()
     inst.ext_hdrs = [create_mock(["EXT_CLASS"]), 0]
     # Call
     ntools.eq_(inst._get_next_hdr(), inst.ext_hdrs[0].EXT_CLASS)
示例#2
0
 def test_no_exts(self):
     inst = SCIONExtPacket()
     inst.ext_hdrs = []
     inst._l4_proto = 42
     # Call
     ntools.eq_(inst._get_next_hdr(), 42)