Total Complexity | 1 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | """Packet in message tests.""" |
||
2 | from pyof.v0x01.asynchronous.packet_in import PacketIn, PacketInReason |
||
3 | from tests.unit.test_struct import TestStruct |
||
4 | |||
5 | |||
6 | class TestPacketIn(TestStruct): |
||
7 | """Packet in message tests (also those in :class:`.TestDump`).""" |
||
8 | |||
9 | @classmethod |
||
10 | def setUpClass(cls): |
||
11 | """Configure raw file and its object in parent class (TestDump).""" |
||
12 | super().setUpClass() |
||
13 | super().set_raw_dump_file('v0x01', 'ofpt_packet_in') |
||
14 | super().set_raw_dump_object(PacketIn, xid=15, buffer_id=1, total_len=1, |
||
15 | in_port=1, |
||
16 | reason=PacketInReason.OFPR_ACTION) |
||
17 | # Different from the specification, the minimum size of this class is |
||
18 | # 18, not 20. |
||
19 | super().set_minimum_size(18) |
||
20 |