Test Failed
Pull Request — master (#404)
by
unknown
01:18
created

_get_desc_stats()   A

Complexity

Conditions 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
rs 9.4285
cc 1
1
"""Test DescStats message."""
2
from pyof.foundation.constants import DESC_STR_LEN
3
from pyof.v0x01.controller2switch.common import DescStats, StatsTypes
4
from pyof.v0x01.controller2switch.stats_reply import StatsReply
5
from tests.test_struct import TestMsgDumpFile
6
7
8
class TestDescStats(TestMsgDumpFile):
9
    """Test class for TestDescStats."""
10
11
    dumpfile = 'v0x01/ofpt_desc_stats_reply.dat'
12
13
    content = 'A' * DESC_STR_LEN
14
    desc = DescStats(mfr_desc=content, hw_desc=content,
15
                     sw_desc=content, serial_num=content,
16
                     dp_desc=content)
17
    obj = StatsReply(xid=14,
18
                     body_type=StatsTypes.OFPST_DESC,
19
                     flags=0, body=desc)
20
    min_size = 12
21