diff options
-rw-r--r-- | ryu/tests/unit/packet/test_packet.py | 2 | ||||
-rw-r--r-- | ryu/tests/unit/packet/test_slow.py | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/ryu/tests/unit/packet/test_packet.py b/ryu/tests/unit/packet/test_packet.py index 652d3265..a793a5fa 100644 --- a/ryu/tests/unit/packet/test_packet.py +++ b/ryu/tests/unit/packet/test_packet.py @@ -1395,7 +1395,7 @@ class TestPacket(unittest.TestCase): p.serialize() # ethernet !6s6sH - e_buf = self.dst_mac + self.src_mac + b'\x05\xdc' + e_buf = self.dst_mac_bin + self.src_mac_bin + b'\x05\xdc' # llc !BBB l_buf = (b'\x42' diff --git a/ryu/tests/unit/packet/test_slow.py b/ryu/tests/unit/packet/test_slow.py index 81749339..9e077fd2 100644 --- a/ryu/tests/unit/packet/test_slow.py +++ b/ryu/tests/unit/packet/test_slow.py @@ -15,10 +15,11 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -import unittest -import logging import copy +import logging from struct import pack, unpack_from +import unittest + from nose.tools import ok_, eq_, raises from ryu.ofproto import ether from ryu.lib.packet.ethernet import ethernet @@ -143,7 +144,8 @@ class Test_slow(unittest.TestCase): slow.parser(self.buf) def test_not_implemented_subtype(self): - not_implemented_buf = str(SLOW_SUBTYPE_MARKER) + self.buf[1:] + not_implemented_buf = pack( + slow._PACK_STR, SLOW_SUBTYPE_MARKER) + self.buf[1:] (instance, nexttype, last) = slow.parser(not_implemented_buf) assert None == instance assert None == nexttype |