mirror of
https://github.com/espressif/openthread.git
synced 2026-10-16 12:47:38 +00:00
[style] apply google python style guide (#4501)
This commit applies and enforces Google's python style for tests.
This commit is contained in:
@@ -43,6 +43,7 @@ SED1 = 5
|
||||
|
||||
|
||||
class Cert_5_3_09_AddressQuery(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.simulator = config.create_default_simulator()
|
||||
|
||||
@@ -130,8 +131,7 @@ class Cert_5_3_09_AddressQuery(unittest.TestCase):
|
||||
dut_router2_messages = self.simulator.get_messages_sent_by(DUT_ROUTER2)
|
||||
msg = dut_router2_messages.next_coap_message('0.02', '/a/aq')
|
||||
msg.assertSentToDestinationAddress(
|
||||
config.REALM_LOCAL_ALL_ROUTERS_ADDRESS
|
||||
)
|
||||
config.REALM_LOCAL_ALL_ROUTERS_ADDRESS)
|
||||
command.check_address_query(
|
||||
msg,
|
||||
self.nodes[DUT_ROUTER2],
|
||||
@@ -157,9 +157,8 @@ class Cert_5_3_09_AddressQuery(unittest.TestCase):
|
||||
# Verify DUT_ROUTER2 sent an Address Notification message
|
||||
dut_router2_messages = self.simulator.get_messages_sent_by(DUT_ROUTER2)
|
||||
msg = dut_router2_messages.next_coap_message('0.02', '/a/an')
|
||||
command.check_address_notification(
|
||||
msg, self.nodes[DUT_ROUTER2], self.nodes[ROUTER1]
|
||||
)
|
||||
command.check_address_notification(msg, self.nodes[DUT_ROUTER2],
|
||||
self.nodes[ROUTER1])
|
||||
|
||||
# 5 SED1: SED1 sends an ICMPv6 Echo Request to the ROUTER3 using GUA
|
||||
# 2001:: address
|
||||
@@ -178,8 +177,7 @@ class Cert_5_3_09_AddressQuery(unittest.TestCase):
|
||||
|
||||
# Verify DUT_ROUTER2 forwarded the ICMPv6 Echo Reply to SED1
|
||||
msg = dut_router2_messages_temp.get_icmp_message(
|
||||
ipv6.ICMP_ECHO_RESPONSE
|
||||
)
|
||||
ipv6.ICMP_ECHO_RESPONSE)
|
||||
assert (
|
||||
msg is not None
|
||||
), "Error: The DUT_ROUTER2 didn't forward ICMPv6 Echo Reply to SED1"
|
||||
@@ -197,8 +195,7 @@ class Cert_5_3_09_AddressQuery(unittest.TestCase):
|
||||
dut_router2_messages = self.simulator.get_messages_sent_by(DUT_ROUTER2)
|
||||
msg = dut_router2_messages.next_coap_message('0.02', '/a/aq')
|
||||
msg.assertSentToDestinationAddress(
|
||||
config.REALM_LOCAL_ALL_ROUTERS_ADDRESS
|
||||
)
|
||||
config.REALM_LOCAL_ALL_ROUTERS_ADDRESS)
|
||||
|
||||
# 7 SED1: Power off SED1 and wait to allow DUT_ROUTER2 to timeout the
|
||||
# child
|
||||
|
||||
Reference in New Issue
Block a user