This repository has been archived by the owner on Apr 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added unit tests for FlowStats and FlowStatsRequest - Issue #158
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"""Flow stats message.""" | ||
from pyof.v0x04.controller2switch.common import FlowStats | ||
from tests.test_struct import TestStruct | ||
|
||
|
||
class TestFlowStats(TestStruct): | ||
"""Flow stats message.""" | ||
|
||
@classmethod | ||
def setUpClass(cls): | ||
"""Configure raw file and its object in parent class (TestDump).""" | ||
super().setUpClass() | ||
super().set_raw_dump_file('v0x04', 'ofpt_flow_stats') | ||
super().set_raw_dump_object(FlowStats) | ||
super().set_minimum_size(56) |
15 changes: 15 additions & 0 deletions
15
tests/v0x04/test_controller2switch/test_flow_stats_request.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"""Flow stats request message.""" | ||
from pyof.v0x04.controller2switch.common import FlowStatsRequest | ||
from tests.test_struct import TestStruct | ||
|
||
|
||
class FlowStatsRequest(TestStruct): | ||
"""Flow stats request message.""" | ||
|
||
@classmethod | ||
def setUpClass(cls): | ||
"""Configure raw file and its object in parent class (TestDump).""" | ||
super().setUpClass() | ||
super().set_raw_dump_file('v0x04', 'ofpt_flow_stats_request') | ||
super().set_raw_dump_object(FlowStatsRequest) | ||
super().set_minimum_size(40) |