summaryrefslogtreecommitdiffstats
path: root/test/test_classify_l2_acl.py
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2019-03-06 08:23:58 -0800
committerOle Trøan <otroan@employees.org>2019-03-07 22:29:00 +0000
commitea2450fa2d1e8ba0295ea9861a404796100dad1e (patch)
treeabc11c27a65c8af6f839ea0af73cac5560933c3b /test/test_classify_l2_acl.py
parent4a4cea02ef82793232cab4d878baca5cf0134966 (diff)
VPP-1508: Python3 tests. Explicitly specify string formatting.
.format() doesn't understand what to do with binary values by default. Specify that we expect coersion to string. Change-Id: Ic4b697f70852124dc85ab231f76b7934d0d71f4d Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/test_classify_l2_acl.py')
-rw-r--r--test/test_classify_l2_acl.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_classify_l2_acl.py b/test/test_classify_l2_acl.py
index 5c9ccc9ae8d..0795907b76e 100644
--- a/test/test_classify_l2_acl.py
+++ b/test/test_classify_l2_acl.py
@@ -174,8 +174,8 @@ class TestClassifyAcl(VppTestCase):
:param str ether_type: ethernet type <0-ffff>
"""
- return ('{:0>12}{:0>12}{:0>4}'.format(dst_mac, src_mac,
- ether_type)).rstrip('0')
+ return ('{!s:0>12}{!s:0>12}{!s:0>4}'.format(
+ dst_mac, src_mac, ether_type)).rstrip('0')
@staticmethod
def build_mac_match(dst_mac='', src_mac='', ether_type=''):
@@ -190,8 +190,8 @@ class TestClassifyAcl(VppTestCase):
if src_mac:
src_mac = src_mac.replace(':', '')
- return ('{:0>12}{:0>12}{:0>4}'.format(dst_mac, src_mac,
- ether_type)).rstrip('0')
+ return ('{!s:0>12}{!s:0>12}{!s:0>4}'.format(
+ dst_mac, src_mac, ether_type)).rstrip('0')
def create_classify_table(self, key, mask, data_offset=0, is_add=1):
"""Create Classify Table