TestPortMod.setUpClass()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 11
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 11
rs 9.9
c 0
b 0
f 0
cc 1
nop 1
1
"""Test PortMod message."""
2
from pyof.v0x01.common.phy_port import PortConfig, PortFeatures
3
from pyof.v0x01.controller2switch.port_mod import PortMod
4
from tests.unit.test_struct import TestStruct
5
6
7
class TestPortMod(TestStruct):
8
    """Test class for PortMod."""
9
10
    @classmethod
11
    def setUpClass(cls):
12
        """[Controller2Switch/PortMod] - size 32."""
13
        super().setUpClass()
14
        super().set_raw_dump_file('v0x01', 'ofpt_port_mod')
15
        super().set_raw_dump_object(PortMod, xid=3, port_no=80,
16
                                    hw_addr='aa:bb:cc:00:33:9f',
17
                                    config=PortConfig.OFPPC_PORT_DOWN,
18
                                    mask=PortConfig.OFPPC_NO_FWD,
19
                                    advertise=PortFeatures.OFPPF_FIBER)
20
        super().set_minimum_size(32)
21