Commit c31ca80c authored by Yonghong Song's avatar Yonghong Song

Fix a python (version 2.7.3) error

Signed-off-by: default avatarYonghong Song <yhs@plumgrid.com>
parent cecd0da5
......@@ -32,10 +32,11 @@ class TestBPFSocket(TestCase):
key = Key(IPAddress("172.16.1.1").value, IPAddress("172.16.1.2").value)
leaf = Leaf(IPAddress("192.168.1.1").value, IPAddress("192.168.1.2").value, 0)
self.xlate.put(key, leaf)
with socket(AF_INET, SOCK_DGRAM) as udp:
udp.sendto(b"a" * 10, ("172.16.1.1", 5000))
udp = socket(AF_INET, SOCK_DGRAM)
udp.sendto(b"a" * 10, ("172.16.1.1", 5000))
leaf = self.xlate.get(key)
self.assertGreater(leaf.xlated_pkts, 0)
udp.close()
if __name__ == "__main__":
main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment