Signed-off-by: YAMAMOTO Takashi <yamam...@valinux.co.jp>
---
 ryu/tests/unit/ofproto/test_parser_v12.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/ryu/tests/unit/ofproto/test_parser_v12.py 
b/ryu/tests/unit/ofproto/test_parser_v12.py
index c5a85e8..bf0e49e 100644
--- a/ryu/tests/unit/ofproto/test_parser_v12.py
+++ b/ryu/tests/unit/ofproto/test_parser_v12.py
@@ -6660,6 +6660,16 @@ class TestOFPMatch(unittest.TestCase):
         if mask and res.fields[0].mask is not None:
             eq_(res.fields[0].mask, mask)
 
+        # to_jsondict
+        jsondict = match.to_jsondict()
+
+        # from_jsondict
+        match2 = match.from_jsondict(jsondict["OFPMatch"])
+        buf2 = bytearray()
+        match2.serialize(buf2, 0)
+        eq_(str(match), str(match2))
+        eq_(buf, buf2)
+
     def test_parse_unknown_field(self):
         buf = bytearray()
         ofproto_parser.msg_pack_into('!HH', buf, 0, ofproto_v1_2.OFPMT_OXM,
-- 
1.8.1.5


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to