faucetget tests
This commit is contained in:
@@ -86,10 +86,13 @@ class CryptoConditionsTest (BitcoinTestFramework):
|
|||||||
result = rpc.faucetfund("-1")
|
result = rpc.faucetfund("-1")
|
||||||
assert_equal(result['result'], 'error')
|
assert_equal(result['result'], 'error')
|
||||||
|
|
||||||
result = rpc.faucetfund("1")
|
# why does this fail?
|
||||||
|
#result = rpc.faucetfund("1987")
|
||||||
|
result = rpc.faucetfund("2")
|
||||||
assert_equal(result['result'], 'success')
|
assert_equal(result['result'], 'success')
|
||||||
assert result['hex'], "hex key found"
|
assert result['hex'], "hex key found"
|
||||||
|
|
||||||
|
# broadcast the xtn
|
||||||
result = rpc.sendrawtransaction(result['hex'])
|
result = rpc.sendrawtransaction(result['hex'])
|
||||||
txid = result[0]
|
txid = result[0]
|
||||||
assert txid, "found txid"
|
assert txid, "found txid"
|
||||||
@@ -108,6 +111,15 @@ class CryptoConditionsTest (BitcoinTestFramework):
|
|||||||
assert_equal(result['result'], 'success')
|
assert_equal(result['result'], 'success')
|
||||||
assert_greater_than( result['funding'], 0 )
|
assert_greater_than( result['funding'], 0 )
|
||||||
|
|
||||||
|
result = rpc.faucetget()
|
||||||
|
assert_equal(result['result'], 'success')
|
||||||
|
assert result['hex'], "hex key found"
|
||||||
|
|
||||||
|
# broadcast the xtn
|
||||||
|
result = rpc.sendrawtransaction(result['hex'])
|
||||||
|
txid = result[0]
|
||||||
|
assert txid, "found txid"
|
||||||
|
|
||||||
# Dice tests
|
# Dice tests
|
||||||
dice = rpc.diceaddress()
|
dice = rpc.diceaddress()
|
||||||
assert_equal(dice['result'], 'success')
|
assert_equal(dice['result'], 'success')
|
||||||
|
|||||||
Reference in New Issue
Block a user