File: test_set_config.py

package info (click to toggle)
python-openflow 2021.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,224 kB
  • sloc: python: 6,906; sh: 4; makefile: 4
file content (20 lines) | stat: -rw-r--r-- 817 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""Set Config message tests."""
from pyof.v0x04.common.action import ControllerMaxLen
from pyof.v0x04.controller2switch.common import ConfigFlag
from pyof.v0x04.controller2switch.set_config import SetConfig
from tests.unit.test_struct import TestStruct


class TestSetConfig(TestStruct):
    """Test the Set Config message."""

    @classmethod
    def setUpClass(cls):
        """Configure raw file and its object in parent class (TestDump)."""
        buffer = ControllerMaxLen.OFPCML_NO_BUFFER
        super().setUpClass()
        super().set_raw_dump_file('v0x04', 'ofpt_set_config')
        super().set_raw_dump_object(SetConfig, xid=1201346349,
                                    flags=ConfigFlag.OFPC_FRAG_NORMAL,
                                    miss_send_len=buffer)
        super().set_minimum_size(12)