test: use f-strings in interface_*.py tests

This commit is contained in:
fanquake
2021-06-12 14:26:31 +08:00
parent 86d958262d
commit c2a5d560df
5 changed files with 54 additions and 54 deletions

View File

@@ -16,7 +16,7 @@ def expect_http_status(expected_http_status, expected_rpc_code,
fcn, *args):
try:
fcn(*args)
raise AssertionError("Expected RPC error %d, got none" % expected_rpc_code)
raise AssertionError(f"Expected RPC error {expected_rpc_code}, got none")
except JSONRPCException as exc:
assert_equal(exc.error["code"], expected_rpc_code)
assert_equal(exc.http_status, expected_http_status)