| Total Complexity | 1 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | """Test for PortStatsRequest.""" |
||
| 2 | from pyof.v0x01.controller2switch.common import PortStatsRequest, StatsType |
||
| 3 | from pyof.v0x01.controller2switch.stats_request import StatsRequest |
||
| 4 | from tests.unit.test_struct import TestStruct |
||
| 5 | |||
| 6 | |||
| 7 | class TestPortStatsRequest(TestStruct): |
||
| 8 | """Test for PortStatsRequest.""" |
||
| 9 | |||
| 10 | @classmethod |
||
| 11 | def setUpClass(cls): |
||
| 12 | """[Controller2Switch/PortStatsRequest] - size 8.""" |
||
| 13 | super().setUpClass() |
||
| 14 | super().set_raw_dump_file('v0x01', 'ofpt_port_stats_request') |
||
| 15 | super().set_raw_dump_object(StatsRequest, xid=17, |
||
| 16 | body_type=StatsType.OFPST_PORT, |
||
| 17 | flags=0, body=PortStatsRequest(port_no=80)) |
||
| 18 | super().set_minimum_size(12) |
||
| 19 |