[test] fix python formatting in v1_2_* tests (#5225)

In some test scripts, %s and format() are used by mistake.
This commit is contained in:
Rongli Sun
2020-07-13 23:18:51 +08:00
committed by GitHub
parent 848feb5aa5
commit 32a3bef6dd
3 changed files with 6 additions and 7 deletions
+1 -2
View File
@@ -500,8 +500,7 @@ void Interpreter::ProcessBackboneRouter(uint8_t aArgsLength, char *aArgs[])
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
otError Interpreter::ProcessBackboneRouterLocal(uint8_t aArgsLength, char *aArgs[])
{
otError error = OT_ERROR_NONE;
;
otError error = OT_ERROR_NONE;
otBackboneRouterConfig config;
unsigned long value;
@@ -263,7 +263,7 @@ class TestBackboneRouterService(thread_cert.TestCase):
# 6a) Check the uniqueness of DUA by comparing the one in above 4a).
bbr2_dua2 = self.nodes[BBR_2].get_addr(config.DOMAIN_PREFIX)
assert bbr2_dua == bbr2_dua2, 'Error: Unexpected different DUA (%s v.s. %s)'.format(
assert bbr2_dua == bbr2_dua2, 'Error: Unexpected different DUA ({} v.s. {})'.format(
bbr2_dua, bbr2_dua2)
# 6b) Check communication via DUA
@@ -170,11 +170,11 @@ class TestMulticastRegistration(thread_cert.TestCase):
msg, multicast_address)
if in_address_registration:
assert is_in, 'Error: %s %s in AddressRegistrationTLV %s'.format(
'Expected', multicast_address, ' not found')
assert is_in, 'Error: Expected {} in AddressRegistrationTLV not found'.format(
multicast_address)
else:
assert not is_in, 'Error: %s %s in AddressRegistrationTLV %s'.format(
'Unexpected', multicast_address, '')
assert not is_in, 'Error: Unexpected {} in AddressRegistrationTLV'.format(
multicast_address)
def test(self):