TestBitcoinEmulator¶
-
class
tests.test_bitcoin.
TestBitcoinEmulator
(methodName='runTest')[source]¶ -
EXTERNAL_ADDRESS
= '13J8HRihYqEDYHAxLciryQYTjpxXcjYMmR'¶ A Bitcoin address considered ‘foreign’ for testing that sending reduces balance
-
LOCAL_ADDRESS
= '1PNgW6AgPZMys844kFS2dK4tt7F36MzLC8'¶ A Bitcoin address considered to be in the wallet
-
emulator
= None¶ Stores the
Process
returned frombitcoin.j_server()
-
classmethod
setUpClass
() → None[source]¶ Launch the Bitcoin RPC emulator in the background on default port 8332
-
test_getblockchaininfo
()[source]¶ Test that the
getblockchaininfo
JsonRPC call returns data as expected
-
test_getnewaddress
()[source]¶ Get a new address from the emulator and confirm it seems like a BTC address
-
Methods¶
Methods
Launch the Bitcoin RPC emulator in the background on default port 8332 |
|
Shutdown the Bitcoin RPC emulator process |
|
Test that the |
|
Test that the |
|
Get a new address from the emulator and confirm it seems like a BTC address |
|
Test sending coins to external address creates a TX in listtransactions, and reduces the balance |
Attributes¶
Attributes
A Bitcoin address considered ‘foreign’ for testing that sending reduces balance |
|
A Bitcoin address considered to be in the wallet |
|
Wrapper class for JsonRPC, with default host 127.0.0.1 and port 8332 Contains pre-defined methods with pydoc for interacting with bitcoind compatible JsonRPC services including most coin daemons forked from Bitcoin, e.g. |