Signed-off-by: Satoshi Kobayashi <[email protected]>
---
ryu/tests/unit/lib/test_addrconv.py | 20 ++++++++++----------
ryu/tests/unit/lib/test_mac.py | 2 +-
ryu/tests/unit/ofproto/test_oxm.py | 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/ryu/tests/unit/lib/test_addrconv.py
b/ryu/tests/unit/lib/test_addrconv.py
index 39e486d..7787703 100644
--- a/ryu/tests/unit/lib/test_addrconv.py
+++ b/ryu/tests/unit/lib/test_addrconv.py
@@ -36,21 +36,21 @@ class Test_addrconv(unittest.TestCase):
eq_(conv.bin_to_text(bin_value), text_value)
def test_ipv4(self):
- self._test_conv(addrconv.ipv4, '0.0.0.0', '\x00\x00\x00\x00')
- self._test_conv(addrconv.ipv4, '127.0.0.1', '\x7f\x00\x00\x01')
- self._test_conv(addrconv.ipv4, '255.255.0.0', '\xff\xff\x00\x00')
+ self._test_conv(addrconv.ipv4, '0.0.0.0', b'\x00\x00\x00\x00')
+ self._test_conv(addrconv.ipv4, '127.0.0.1', b'\x7f\x00\x00\x01')
+ self._test_conv(addrconv.ipv4, '255.255.0.0', b'\xff\xff\x00\x00')
def test_ipv6(self):
self._test_conv(addrconv.ipv6, 'ff02::1',
- ('\xff\x02\x00\x00\x00\x00\x00\x00'
- '\x00\x00\x00\x00\x00\x00\x00\x01'))
+ (b'\xff\x02\x00\x00\x00\x00\x00\x00'
+ b'\x00\x00\x00\x00\x00\x00\x00\x01'))
self._test_conv(addrconv.ipv6, 'fe80::f00b:a4ff:fe7d:f8ea',
- ('\xfe\x80\x00\x00\x00\x00\x00\x00'
- '\xf0\x0b\xa4\xff\xfe\x7d\xf8\xea'))
+ (b'\xfe\x80\x00\x00\x00\x00\x00\x00'
+ b'\xf0\x0b\xa4\xff\xfe\x7d\xf8\xea'))
self._test_conv(addrconv.ipv6, '::',
- ('\x00\x00\x00\x00\x00\x00\x00\x00'
- '\x00\x00\x00\x00\x00\x00\x00\x00'))
+ (b'\x00\x00\x00\x00\x00\x00\x00\x00'
+ b'\x00\x00\x00\x00\x00\x00\x00\x00'))
def test_mac(self):
self._test_conv(addrconv.mac, 'f2:0b:a4:01:0a:23',
- '\xf2\x0b\xa4\x01\x0a\x23')
+ b'\xf2\x0b\xa4\x01\x0a\x23')
diff --git a/ryu/tests/unit/lib/test_mac.py b/ryu/tests/unit/lib/test_mac.py
index a0125d3..8613bed 100644
--- a/ryu/tests/unit/lib/test_mac.py
+++ b/ryu/tests/unit/lib/test_mac.py
@@ -72,7 +72,7 @@ class Test_mac(unittest.TestCase):
""" len(hexes) = 6 (False)
"""
addr = 'aa:aa:aa:aa:aa:aa'
- val = '\xaa\xaa\xaa\xaa\xaa\xaa'
+ val = b'\xaa\xaa\xaa\xaa\xaa\xaa'
res = mac.haddr_to_bin(addr)
diff --git a/ryu/tests/unit/ofproto/test_oxm.py
b/ryu/tests/unit/ofproto/test_oxm.py
index ffb762f..448edf5 100644
--- a/ryu/tests/unit/ofproto/test_oxm.py
+++ b/ryu/tests/unit/ofproto/test_oxm.py
@@ -171,7 +171,7 @@ class Test_OXM(unittest.TestCase):
self._test(user, on_wire, 10)
def test_basic_unknown_nomask(self):
- user = ('field_100', 'aG9nZWhvZ2U=')
+ user = ('field_100', b'aG9nZWhvZ2U=')
on_wire = (
b'\x00\x00\xc8\x08'
b'hogehoge'
@@ -179,7 +179,7 @@ class Test_OXM(unittest.TestCase):
self._test(user, on_wire, 4)
def test_basic_unknown_mask(self):
- user = ('field_100', ('aG9nZWhvZ2U=', 'ZnVnYWZ1Z2E='))
+ user = ('field_100', (b'aG9nZWhvZ2U=', b'ZnVnYWZ1Z2E='))
on_wire = (
b'\x00\x00\xc9\x10'
b'hogehoge'
--
2.3.2 (Apple Git-55)
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel