tests.unit.v0x01.test_controller2switch.test_aggregate_stats_reply   A
last analyzed

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 TestAggregateStatsReply.setUpClass() 0 11 1
1
"""Test for AggregateStatsReply message."""
2
from pyof.v0x01.controller2switch.common import AggregateStatsReply, StatsType
3
from pyof.v0x01.controller2switch.stats_reply import StatsReply
4
from tests.unit.test_struct import TestStruct
5
6
7
class TestAggregateStatsReply(TestStruct):
8
    """Test for AggregateStatsReply message."""
9
10
    @classmethod
11
    def setUpClass(cls):
12
        """[Controller2Switch/AggregateStatsReply] - size 24."""
13
        aggregate_stats_reply = AggregateStatsReply(packet_count=5,
14
                                                    byte_count=1, flow_count=8)
15
        super().setUpClass()
16
        super().set_raw_dump_file('v0x01', 'ofpt_aggregate_stats_reply')
17
        super().set_raw_dump_object(StatsReply, xid=17,
18
                                    body_type=StatsType.OFPST_AGGREGATE,
19
                                    flags=0, body=aggregate_stats_reply)
20
        super().set_minimum_size(12)
21