Passed
Push — master ( b50e97...feedcb )
by Humberto
01:28 queued 14s
created

tests.unit.v0x04.test_controller2switch.test_table_mod   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 9
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A TestTableMod.test_min_size() 0 3 1
A TestTableMod.test_header_type() 0 3 1
1
"""Table flow modification tests."""
2
import unittest
3
4
from pyof.v0x04.common.header import Type
5
from pyof.v0x04.controller2switch.table_mod import TableMod
6
7
8
class TestTableMod(unittest.TestCase):
9
    """TableMod test."""
10
11
    def test_min_size(self):
12
        """Test minimum message size."""
13
        self.assertEqual(16, TableMod().get_size())
14
15
    def test_header_type(self):
16
        """Test header type."""
17
        self.assertEqual(Type.OFPT_TABLE_MOD, TableMod().header.message_type)
18