diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-10-25 22:35:25 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-10-25 23:20:33 +0000 |
commit | 978a61f34f01662dd7ebc667b7d306d293c8c8c8 (patch) | |
tree | 5c96d633cbb5ee8acb1e7ec94b00bd89cae39b1f /tests/functional_tests | |
parent | Merge pull request #6024 (diff) | |
download | monero-978a61f34f01662dd7ebc667b7d306d293c8c8c8.tar.xz |
functional_tests: fix rpc_payment tests with python 3
Diffstat (limited to '')
-rwxr-xr-x | tests/functional_tests/rpc_payment.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/functional_tests/rpc_payment.py b/tests/functional_tests/rpc_payment.py index fa72f547a..4c777ccd7 100755 --- a/tests/functional_tests/rpc_payment.py +++ b/tests/functional_tests/rpc_payment.py @@ -51,13 +51,13 @@ class RPCPaymentTest(): self.test_free_access() def get_keys(self): - output = subprocess.check_output([self.make_test_signature]).rstrip() + output = subprocess.check_output([self.make_test_signature]).decode('utf-8').rstrip() fields = output.split() assert len(fields) == 2 return fields def get_signature(self): - return subprocess.check_output([self.make_test_signature, self.secret_key]).rstrip() + return subprocess.check_output([self.make_test_signature, self.secret_key]).decode('utf-8').rstrip() def reset(self): print('Resetting blockchain') @@ -256,7 +256,8 @@ class RPCPaymentTest(): found_close_stale += 1 found_valid += 1 except Exception as e: - if e[0]['error']['code'] == -18: # stale + #if e[0]['error']['code'] == -18: # stale + if "'code': -18" in str(e): # stale (ugly version, but also works with python 3) found_late_stale += 1 else: found_invalid += 1 |