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 for FlowStats and FlowStatsRequest - Issue #158
Browse files Browse the repository at this point in the history
  • Loading branch information
abaruchi committed Sep 14, 2016
1 parent 271751e commit 0d7a991
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_flow_stats.py
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 tests/v0x04/test_controller2switch/test_flow_stats_request.py
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)

0 comments on commit 0d7a991

Please sign in to comment.