Reformats code to match code guidelines

This commit is contained in:
Sergi Delgado Segura
2019-11-07 15:23:43 +00:00
parent b16775a4aa
commit 20f296c9d4
42 changed files with 770 additions and 587 deletions

View File

@@ -17,7 +17,7 @@ c_logger.disabled = True
sent_txs = []
@pytest.fixture(scope='module')
@pytest.fixture(scope="module")
def carrier():
return Carrier()
@@ -28,7 +28,7 @@ def test_send_transaction(run_bitcoind, carrier):
receipt = carrier.send_transaction(tx, txid)
assert(receipt.delivered is True)
assert receipt.delivered is True
def test_send_double_spending_transaction(carrier):
@@ -47,9 +47,8 @@ def test_send_double_spending_transaction(carrier):
# The carrier should report delivered True for both, but in the second case the transaction was already delivered
# (either by himself or someone else)
assert(receipt.delivered is True)
assert (receipt2.delivered is True and receipt2.confirmations >= 1
and receipt2.reason == RPC_VERIFY_ALREADY_IN_CHAIN)
assert receipt.delivered is True
assert receipt2.delivered is True and receipt2.confirmations >= 1 and receipt2.reason == RPC_VERIFY_ALREADY_IN_CHAIN
def test_send_transaction_invalid_format(carrier):
@@ -58,7 +57,7 @@ def test_send_transaction_invalid_format(carrier):
txid = sha256d(tx)
receipt = carrier.send_transaction(txid, txid)
assert (receipt.delivered is False and receipt.reason == RPC_DESERIALIZATION_ERROR)
assert receipt.delivered is False and receipt.reason == RPC_DESERIALIZATION_ERROR
def test_get_transaction():
@@ -73,5 +72,3 @@ def test_get_non_existing_transaction():
tx_info = Carrier.get_transaction(get_random_value_hex(32))
assert tx_info is None