Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
VPP-1508: Python3 tests. Explicitly specify string formatting.
[vpp.git]
/
test
/
test_acl_plugin_macip.py
diff --git
a/test/test_acl_plugin_macip.py
b/test/test_acl_plugin_macip.py
index
4872bff
..
d2d684a
100644
(file)
--- a/
test/test_acl_plugin_macip.py
+++ b/
test/test_acl_plugin_macip.py
@@
-4,11
+4,11
@@
from __future__ import print_function
"""
import binascii
import random
"""
import binascii
import random
+from socket import inet_ntop, inet_pton, AF_INET, AF_INET6
+from struct import pack, unpack
import re
import unittest
import re
import unittest
-from socket import inet_ntop, inet_pton, AF_INET, AF_INET6
-from struct import *
from scapy.packet import Raw
from scapy.layers.l2 import Ether
from scapy.layers.inet import IP, UDP
from scapy.packet import Raw
from scapy.layers.l2 import Ether
from scapy.layers.inet import IP, UDP
@@
-237,7
+237,8
@@
class MethodHolder(VppTestCase):
mac = ':'.join(re.findall('..', '{:02x}'.format(
src_mac))[:3])+":00:00:00"
else:
mac = ':'.join(re.findall('..', '{:02x}'.format(
src_mac))[:3])+":00:00:00"
else:
- mac = ':'.join(re.findall('..', '{:02x}'.format(src_mac)))
+ mac = ':'.join(re.findall(
+ '..', '{:02x}'.format(src_mac)))
if ip_type == self.EXACT_IP:
ip4[3] = random.randint(100, 200)
if ip_type == self.EXACT_IP:
ip4[3] = random.randint(100, 200)