File: test_packet_in.py

package info (click to toggle)
python-openflow 1.1.0~alpha2-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 692 kB
  • ctags: 1,027
  • sloc: python: 2,713; makefile: 207; sh: 8
file content (29 lines) | stat: -rw-r--r-- 993 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""Packet in message tests."""
import unittest

from pyof.v0x01.asynchronous.packet_in import PacketIn, PacketInReason
from tests.test_struct import TestStruct


class TestPacketIn(TestStruct):
    """Packet in message tests (also those in :class:`.TestDump`)."""

    @classmethod
    def setUpClass(cls):
        """Configure raw file and its object in parent class (TestDump)."""
        super().setUpClass()
        super().set_raw_dump_file('v0x01', 'ofpt_packet_in')
        super().set_raw_dump_object(PacketIn, xid=1, buffer_id=1, total_len=1,
                                    in_port=1,
                                    reason=PacketInReason.OFPR_ACTION)
        # Different from the specification, the minimum size of this class is
        # 18, not 20.
        super().set_minimum_size(18)

    @unittest.skip('Need to recover dump contents.')
    def test_pack(self):
        pass

    @unittest.skip('Need to recover dump contents.')
    def test_unpack(self):
        pass