File: test_queue_stats.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 (30 lines) | stat: -rw-r--r-- 795 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
30
import unittest

from pyof.v0x01.controller2switch.common import QueueStats


class TestQueueStats(unittest.TestCase):

    def setUp(self):
        self.message = QueueStats()
        self.message.port_no = 80
        self.message.queue_id = 5
        self.message.tx_bytes = 1
        self.message.tx_packets = 3
        self.message.tx_errors = 2

    def test_get_size(self):
        """[Controller2Switch/QueueStats] - size 32"""
        self.assertEqual(self.message.get_size(), 32)

    @unittest.skip('Not yet implemented')
    def test_pack(self):
        """[Controller2Switch/QueueStats] - packing"""
        # TODO
        pass

    @unittest.skip('Not yet implemented')
    def test_unpack(self):
        """[Controller2Switch/QueueStats] - unpacking"""
        # TODO
        pass