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

TestAggregateStatsRequest.setUpClass()   A

Complexity

Conditions 1

Size

Total Lines 12

Duplication

Lines 12
Ratio 100 %

Importance

Changes 0
Metric Value
dl 12
loc 12
rs 9.4285
c 0
b 0
f 0
cc 1
1
"""Test  AggregateStatsRequest message."""
2
from pyof.v0x01.common.flow_match import Match
3
from pyof.v0x01.common.phy_port import Port
4
from pyof.v0x01.controller2switch.common import (
5
    AggregateStatsRequest, StatsTypes)
6
from pyof.v0x01.controller2switch.stats_request import StatsRequest
7
from tests.test_struct import TestMsgDumpFile
8
9
10 View Code Duplication
class TestAggregateStatsRequest(TestMsgDumpFile):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11
    """Test class for TestAggregateStatsRequest."""
12
13
    dumpfile = 'v0x01/ofpt_aggregate_request.dat'
14
15
    match = Match(in_port=80, dl_src="01:02:03:04:05:06",
16
                  dl_dst="01:02:03:04:05:06", dl_vlan=1,
17
                  dl_vlan_pcp=1, dl_type=1,
18
                  nw_tos=1, nw_proto=1,
19
                  nw_src='192.168.0.1', nw_dst='192.168.0.1',
20
                  tp_src=80, tp_dst=80)
21
    request = AggregateStatsRequest(table_id=1, out_port=Port.OFPP_NONE,
22
                                    match=match)
23
    obj = StatsRequest(xid=17,
24
                       body_type=StatsTypes.OFPST_AGGREGATE,
25
                       flags=0, body=request)
26
    min_size = 12
27