removed the usage of f-strings to maintain compatibility with python 3.5

This commit is contained in:
Gonçalo Valério 2019-11-25 19:15:25 +00:00
parent 0faf45d9d5
commit 11388498cf
2 changed files with 4 additions and 2 deletions

View File

@ -11,7 +11,9 @@ def verify_signature(address: str, challenge: str, signature: str) -> bool:
host = settings.MONERO_WALLET_RPC_HOST
user = settings.MONERO_WALLET_RPC_USER
pwd = settings.MONERO_WALLET_RPC_PASS
wallet_rpc = AuthServiceProxy(f"{protocol}://{user}:{pwd}@{host}/json_rpc")
wallet_rpc = AuthServiceProxy(
"{}://{}:{}@{}/json_rpc".format(protocol, user, pwd, host)
)
result = wallet_rpc.verify(
{"data": challenge, "address": address, "signature": signature}

View File

@ -50,4 +50,4 @@ def test_invalid_address(network, address, settings):
with pytest.raises(ValidationError) as error:
validate_monero_address(address)
assert f"Invalid address for {network}" in str(error.value)
assert "Invalid address for {}".format(network) in str(error.value)