mirror of
https://github.com/espressif/openthread.git
synced 2026-08-08 03:37:46 +00:00
Refactor Python Node ping function (#643)
* Refactor ping command to remove pexpect dependency on each cert test
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
import pexpect
|
||||
import time
|
||||
import unittest
|
||||
|
||||
@@ -75,7 +74,7 @@ class Cert_5_6_2_NetworkDataUpdate(unittest.TestCase):
|
||||
self.assertTrue(any('2001' in word for word in addrs))
|
||||
for addr in addrs:
|
||||
if addr[0:4] == '2001':
|
||||
self.nodes[LEADER].ping(addr)
|
||||
self.assertTrue(self.nodes[LEADER].ping(addr))
|
||||
|
||||
self.nodes[LEADER].remove_whitelist(self.nodes[ED].get_addr64())
|
||||
self.nodes[ED].remove_whitelist(self.nodes[LEADER].get_addr64())
|
||||
@@ -93,7 +92,7 @@ class Cert_5_6_2_NetworkDataUpdate(unittest.TestCase):
|
||||
self.assertTrue(any('2002' in word for word in addrs))
|
||||
for addr in addrs:
|
||||
if addr[0:4] == '2001' or addr[0:4] == '2002':
|
||||
self.nodes[LEADER].ping(addr)
|
||||
self.assertTrue(self.nodes[LEADER].ping(addr))
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user