Passed
Pull Request — master (#577)
by Gleyberson
02:14
created

tests.v0x04.test_controller2switch.test_set_config   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 15
dl 0
loc 21
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A TestSetConfig.setUpClass() 0 10 1
1
"""Set Config message tests."""
2
from pyof.v0x04.common.action import ControllerMaxLen
3
from pyof.v0x04.controller2switch.common import ConfigFlag
4
from pyof.v0x04.controller2switch.set_config import SetConfig
5
from tests.test_struct import TestStruct
6
7
8
class TestSetConfig(TestStruct):
9
    """Test the Set Config message."""
10
11
    @classmethod
12
    def setUpClass(cls):
13
        """Configure raw file and its object in parent class (TestDump)."""
14
        buffer = ControllerMaxLen.OFPCML_NO_BUFFER
15
        super().setUpClass()
16
        super().set_raw_dump_file('v0x04', 'ofpt_set_config')
17
        super().set_raw_dump_object(SetConfig, xid=1201346349,
18
                                    flags=ConfigFlag.OFPC_FRAG_NORMAL,
19
                                    miss_send_len=buffer)
20
        super().set_minimum_size(12)
21