diff options
-rw-r--r-- | ryu/tests/unit/lib/test_addrconv.py | 20 | ||||
-rw-r--r-- | ryu/tests/unit/lib/test_mac.py | 2 | ||||
-rw-r--r-- | 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 39e486dc..77877038 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 a0125d35..8613bedc 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 ffb762fc..448edf55 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' |