Signed-off-by: YAMAMOTO Takashi <[email protected]>
---
 ryu/tests/unit/packet/test_lldp.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/ryu/tests/unit/packet/test_lldp.py 
b/ryu/tests/unit/packet/test_lldp.py
index 60e93b0..6013137 100644
--- a/ryu/tests/unit/packet/test_lldp.py
+++ b/ryu/tests/unit/packet/test_lldp.py
@@ -71,9 +71,10 @@ class TestLLDPMandatoryTLV(unittest.TestCase):
     def test_parse(self):
         buf = self.data
         pkt = packet.Packet(buf)
+        i = iter(pkt)
 
-        eq_(type(pkt.next()), ethernet.ethernet)
-        eq_(type(pkt.next()), lldp.lldp)
+        eq_(type(i.next()), ethernet.ethernet)
+        eq_(type(i.next()), lldp.lldp)
 
     def test_tlv(self):
         tlv = lldp.ChassisID(subtype=lldp.ChassisID.SUB_MAC_ADDRESS,
@@ -225,9 +226,10 @@ class TestLLDPOptionalTLV(unittest.TestCase):
     def test_parse(self):
         buf = self.data
         pkt = packet.Packet(buf)
+        i = iter(pkt)
 
-        eq_(type(pkt.next()), ethernet.ethernet)
-        lldp_pkt = pkt.next()
+        eq_(type(i.next()), ethernet.ethernet)
+        lldp_pkt = i.next()
         eq_(type(lldp_pkt), lldp.lldp)
 
         tlvs = lldp_pkt.tlvs
-- 
1.8.3.1


------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to