tests.unit.v0x01.test_asynchronous.test_packet_in   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 12
dl 0
loc 20
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A TestPacketIn.setUpClass() 0 11 1
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