summaryrefslogtreecommitdiffstats
path: root/test/test_map_br.py
diff options
context:
space:
mode:
authorKlement Sekera <klement.sekera@gmail.com>2022-04-23 11:34:29 +0200
committerOle Tr�an <otroan@employees.org>2022-04-29 09:57:47 +0000
commit16ce09db9e3d7cf588037c80138438095a0ac200 (patch)
treeda24ebad3bb76459b5ab1c08454ca5c0348310d6 /test/test_map_br.py
parent8eeb851d6f9a92911cf0e7f209d9aa31c707d26e (diff)
tests: fix assert_nothing_captured
Type: fix Fixes: 26cd0242c95025e0d644db3a80dfe8dee83b6d7a Change-Id: I9a88221af65f170dc6b1f0dc0992df401e489fa2 Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Diffstat (limited to 'test/test_map_br.py')
-rw-r--r--test/test_map_br.py21
1 files changed, 14 insertions, 7 deletions
diff --git a/test/test_map_br.py b/test/test_map_br.py
index 3602ddd2e31..3fe5c83ab75 100644
--- a/test/test_map_br.py
+++ b/test/test_map_br.py
@@ -363,7 +363,7 @@ class TestMAPBR(VppTestCase):
ICMPv6TimeExceeded().type)
self.assertEqual(rx_pkt[ICMPv6TimeExceeded].code,
ICMPv6TimeExceeded(
- code="hop limit exceeded in transit").code)
+ code="hop limit exceeded in transit").code)
self.assertEqual(rx_pkt[ICMPv6TimeExceeded].hlim, tx_pkt[IP][1].ttl)
self.assertTrue(rx_pkt.haslayer(IPerror6))
self.assertTrue(rx_pkt.haslayer(UDPerror))
@@ -528,7 +528,8 @@ class TestMAPBR(VppTestCase):
self.pg_send(self.pg1, tx_pkt * 1)
self.pg0.get_capture(0, timeout=1)
- self.pg0.assert_nothing_captured("Should drop IPv4 spoof address")
+ self.pg0.assert_nothing_captured(
+ remark="Should drop IPv4 spoof address")
#
# Spoofed IPv4 Source Prefix v6 -> v4 direction
@@ -552,7 +553,8 @@ class TestMAPBR(VppTestCase):
self.pg_send(self.pg1, tx_pkt * 1)
self.pg0.get_capture(0, timeout=1)
- self.pg0.assert_nothing_captured("Should drop IPv4 spoof prefix")
+ self.pg0.assert_nothing_captured(
+ remark="Should drop IPv4 spoof prefix")
#
# Spoofed IPv6 PSID v6 -> v4 direction
@@ -575,7 +577,8 @@ class TestMAPBR(VppTestCase):
self.pg_send(self.pg1, tx_pkt * 1)
self.pg0.get_capture(0, timeout=1)
- self.pg0.assert_nothing_captured("Should drop IPv6 spoof PSID")
+ self.pg0.assert_nothing_captured(
+ remark="Should drop IPv6 spoof PSID")
#
# Spoofed IPv6 subnet field v6 -> v4 direction
@@ -598,7 +601,8 @@ class TestMAPBR(VppTestCase):
self.pg_send(self.pg1, tx_pkt * 1)
self.pg0.get_capture(0, timeout=1)
- self.pg0.assert_nothing_captured("Should drop IPv6 spoof subnet")
+ self.pg0.assert_nothing_captured(
+ remark="Should drop IPv6 spoof subnet")
#
# Spoofed IPv6 port PSID v6 -> v4 direction
@@ -621,7 +625,8 @@ class TestMAPBR(VppTestCase):
self.pg_send(self.pg1, tx_pkt * 1)
self.pg0.get_capture(0, timeout=1)
- self.pg0.assert_nothing_captured("Should drop IPv6 spoof port PSID")
+ self.pg0.assert_nothing_captured(
+ remark="Should drop IPv6 spoof port PSID")
#
# Spoofed IPv6 ICMP ID PSID v6 -> v4 direction
@@ -644,7 +649,8 @@ class TestMAPBR(VppTestCase):
self.pg_send(self.pg1, tx_pkt * 1)
self.pg0.get_capture(0, timeout=1)
- self.pg0.assert_nothing_captured("Should drop IPv6 spoof port PSID")
+ self.pg0.assert_nothing_captured(
+ remark="Should drop IPv6 spoof port PSID")
#
# Map to Map - same rule, different address
@@ -690,5 +696,6 @@ class TestMAPBR(VppTestCase):
rx_pkts = self.pg1.get_capture(1)
rx_pkt = rx_pkts[0]
+
if __name__ == '__main__':
unittest.main(testRunner=VppTestRunner)