Signed-off-by: IWASE Yusuke <[email protected]>
---
 ryu/tests/unit/ofproto/test_parser_v10.py | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/ryu/tests/unit/ofproto/test_parser_v10.py 
b/ryu/tests/unit/ofproto/test_parser_v10.py
index ca47d34..dca2b47 100644
--- a/ryu/tests/unit/ofproto/test_parser_v10.py
+++ b/ryu/tests/unit/ofproto/test_parser_v10.py
@@ -220,6 +220,23 @@ class TestOFPMatch(unittest.TestCase):
         eq_(self.tp_src['val'], res[11])
         eq_(self.tp_dst['val'], res[12])
 
+    def test_getitem(self):
+        c = self._get_obj(self.dl_src, self.dl_dst)
+
+        eq_(self.wildcards['val'], c["wildcards"])
+        eq_(self.in_port['val'], c["in_port"])
+        eq_(self.dl_src, c["dl_src"])
+        eq_(self.dl_dst, c["dl_dst"])
+        eq_(self.dl_vlan['val'], c["dl_vlan"])
+        eq_(self.dl_vlan_pcp['val'], c["dl_vlan_pcp"])
+        eq_(self.dl_type['val'], c["dl_type"])
+        eq_(self.nw_tos['val'], c["nw_tos"])
+        eq_(self.nw_proto['val'], c["nw_proto"])
+        eq_(self.nw_src['val'], c["nw_src"])
+        eq_(self.nw_dst['val'], c["nw_dst"])
+        eq_(self.tp_src['val'], c["tp_src"])
+        eq_(self.tp_dst['val'], c["tp_dst"])
+
 
 class TestOFPActionHeader(unittest.TestCase):
     """ Test case for ofproto_v1_0_parser.OFPActionHeader
-- 
1.9.1


------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to