functional_tests: update uri test with external pid
This commit is contained in:
parent
cc9ca953a9
commit
e9156d78a3
|
@ -142,15 +142,11 @@ class URITest():
|
||||||
assert res.uri.recipient_name == utf8string[0]
|
assert res.uri.recipient_name == utf8string[0]
|
||||||
assert not 'unknown_parameters' in res or len(res.unknown_parameters) == 0
|
assert not 'unknown_parameters' in res or len(res.unknown_parameters) == 0
|
||||||
|
|
||||||
res = wallet.make_uri(address = address, recipient_name = utf8string[0], tx_description = utf8string[1], amount = 1000000000000, payment_id = '1' * 64)
|
# external payment ids are not supported anymore
|
||||||
assert res.uri == 'monero:' + address + '?tx_payment_id=' + '1' * 64 + '&tx_amount=1.000000000000&recipient_name=' + quoted_utf8string[0] + '&tx_description=' + quoted_utf8string[1]
|
ok = False
|
||||||
res = wallet.parse_uri(res.uri)
|
try: res = wallet.make_uri(address = address, recipient_name = utf8string[0], tx_description = utf8string[1], amount = 1000000000000, payment_id = '1' * 64)
|
||||||
assert res.uri.address == address
|
except: ok = True
|
||||||
assert res.uri.payment_id == '1' * 64
|
assert ok
|
||||||
assert res.uri.amount == 1000000000000
|
|
||||||
assert res.uri.tx_description == utf8string[1]
|
|
||||||
assert res.uri.recipient_name == utf8string[0]
|
|
||||||
assert not 'unknown_parameters' in res or len(res.unknown_parameters) == 0
|
|
||||||
|
|
||||||
# spaces must be encoded as %20
|
# spaces must be encoded as %20
|
||||||
res = wallet.make_uri(address = address, tx_description = ' ' + utf8string[1] + ' ' + utf8string[0] + ' ', amount = 1000000000000)
|
res = wallet.make_uri(address = address, tx_description = ' ' + utf8string[1] + ' ' + utf8string[0] + ' ', amount = 1000000000000)
|
||||||
|
|
Loading…
Reference in New Issue