mirror of
https://github.com/espressif/openthread.git
synced 2026-08-20 17:39:51 +00:00
[nat64] NAT64 translator should be active only when local prefix is published (#8558)
If an infrastructure-provided NAT64 prefix is present, we should bypass the NAT64 translator to let the border router forward the packet to the infra NAT64 service.
This commit is contained in:
@@ -38,7 +38,7 @@ import sys
|
||||
import time
|
||||
import traceback
|
||||
import unittest
|
||||
from typing import Optional, Callable, Union, Any
|
||||
from typing import Optional, Callable, Union, Mapping, Any
|
||||
|
||||
import config
|
||||
import debug
|
||||
@@ -592,3 +592,16 @@ class TestCase(NcpSupportMixin, unittest.TestCase):
|
||||
|
||||
else:
|
||||
raise Exception("Route between node %d and %d is not established" % (node1, node2))
|
||||
|
||||
def assertDictIncludes(self, actual: Mapping[str, str], expected: Mapping[str, str]):
|
||||
""" Asserts the `actual` dict includes the `expected` dict.
|
||||
|
||||
Args:
|
||||
actual: A dict for checking.
|
||||
expected: The expected items that the actual dict should contains.
|
||||
"""
|
||||
for k, v in expected.items():
|
||||
if k not in actual:
|
||||
raise AssertionError(f"key {k} is not found in first dict")
|
||||
if v != actual[k]:
|
||||
raise AssertionError(f"{repr(actual[k])} != {repr(v)} for key {k}")
|
||||
|
||||
Reference in New Issue
Block a user