aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_ip4.py
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-02-14 05:33:46 +0000
committerDave Barach <openvpp@barachs.net>2020-02-14 15:17:41 +0000
commit067f9544d52c95c0b60b0e8425fce1e295120180 (patch)
tree16ec7e61507ffcc7485f61cdc93ee9fa40c2f76a /test/test_ip4.py
parenta357a938019c8df2b061cc5bd14cd8a64fac694f (diff)
vcl: fix ldp read on closing session
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I60be191866d20721951ad22f571a2a3275511e12
Diffstat (limited to 'test/test_ip4.py')
0 files changed, 0 insertions, 0 deletions
g.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/usr/bin/env python3
"""Test framework utility functions tests"""

import unittest
from framework import VppTestRunner
from vpp_papi import mac_pton, mac_ntop


class TestUtil (unittest.TestCase):
    """ MAC to binary and back """
    def test_mac_to_binary(self):
        mac = 'aa:bb:cc:dd:ee:ff'
        b = mac_pton(mac)
        mac2 = mac_ntop(b)
        self.assertEqual(type(mac), type(mac2))
        self.assertEqual(mac2, mac)


if __name__ == '__main__':
    unittest.main(testRunner=VppTestRunner)