Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
Added unit tests to new version of PortStatus and PortStatusRequest -…
Browse files Browse the repository at this point in the history
… Issue #158
  • Loading branch information
abaruchi committed Sep 13, 2016
1 parent e203ed2 commit 93a4570
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/v0x04/test_controller2switch/test_port_stats.py
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 tests/v0x04/test_controller2switch/test_port_stats_request.py
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)

0 comments on commit 93a4570

Please sign in to comment.