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 to new version of PortStatus and PortStatusRequest -…
… 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 @@ | ||
"""Config Port Stats message tests.""" | ||
from pyof.v0x04.controller2switch.common import PortStats | ||
from tests.test_struct import TestStruct | ||
|
||
|
||
class TestPortStats(TestStruct): | ||
"""Config Port Stats message tests""" | ||
|
||
@classmethod | ||
def setUpClass(cls): | ||
"""Configure raw file and its object in parent class (TestDump).""" | ||
super().setUpClass() | ||
super().set_raw_dump_file('v0x04', 'ofpt_port_stats') | ||
super().set_raw_dump_object(PortStats) | ||
super().set_minimum_size(112) |
15 changes: 15 additions & 0 deletions
15
tests/v0x04/test_controller2switch/test_port_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 @@ | ||
"""Config Port Stats Request message tests.""" | ||
from pyof.v0x04.controller2switch.common import PortStatsRequest | ||
from tests.test_struct import TestStruct | ||
|
||
|
||
class TestPortStatsRequest(TestStruct): | ||
"""Config Port Stats Request message tests""" | ||
|
||
@classmethod | ||
def setUpClass(cls): | ||
"""Configure raw file and its object in parent class (TestDump).""" | ||
super().setUpClass() | ||
super().set_raw_dump_file('v0x04', 'ofpt_port_stats_request') | ||
super().set_raw_dump_object(PortStatsRequest) | ||
super().set_minimum_size(8) |