They are bugs found during python3 compatibility work.
Signed-off-by: IWAMOTO Toshihiro <[email protected]>
---
ryu/tests/unit/packet/test_packet.py | 2 +-
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 652d326..a793a5f 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 8174933..9e077fd 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
--
2.1.4
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel