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

This commit is contained in:
fanquake committed 2021-08-18 12:39:20 +08:00
1 parent 86d958262d
commit c2a5d560df
5 files changed
+54 -54

No files matched your search

+1 -1
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)