File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ Install dependencies
175175
176176```
177177pip install -r requirements.txt
178- pip install -r rest -requirements.txt
178+ pip install -r test -requirements.txt
179179```
180180
181181Install package
Original file line number Diff line number Diff line change 22from blockfrost import BlockFrostApi , ApiError
33from blockfrost .utils import convert_json_to_object
44
5- drep_id = 'drep1mvdu8slennngja7w4un6knwezufra70887zuxpprd64jxfveahn '
6- tx_hash = 'f5ca33220afcc0340d1fa3cba9b0e1f3c3c6e1eab57d688ed700ae56bbce9170 '
5+ drep_id = 'drep1yfaaaaa270yjt6tu5skndugekprf5ykv5jshanl0c6gqx5qpstskf '
6+ tx_hash = '51f495aa23f4b3b3aa90afde4a0e67823bb7ac4ac65f5ffbb138373b863f2f74 '
77cert_index = 0
8+ # proposal with metadata (treasury_withdrawals type)
9+ metadata_tx_hash = '60ed6ab43c840ff888a8af30a1ed27b41e9f4a91a89822b2b63d1bfc52aeec45'
810
911
1012def test_governance_dreps (requests_mock ):
@@ -265,4 +267,4 @@ def test_governance_proposal_metadata(requests_mock):
265267def test_integration_governance_proposal_metadata ():
266268 if os .getenv ('BLOCKFROST_PROJECT_ID_MAINNET' ):
267269 api = BlockFrostApi (project_id = os .getenv ('BLOCKFROST_PROJECT_ID_MAINNET' ))
268- api .governance_proposal_metadata (tx_hash = tx_hash , cert_index = cert_index )
270+ api .governance_proposal_metadata (tx_hash = metadata_tx_hash , cert_index = cert_index )
Original file line number Diff line number Diff line change @@ -412,7 +412,7 @@ def test_integration_transaction_submit_cbor():
412412
413413 with pytest .raises (ApiError ) as exc_info :
414414 api .transaction_submit_cbor (tx_cbor = tx_cbor )
415- assert exc_info .value .message . find ( "transaction submit error" ) > - 1
415+ assert exc_info .value .status_code == 400
416416 # Make sure that the tx cbor was correctly passed
417417 assert exc_info .value .message .find (
418418 "54bcb22a31a100080ffbf7edbac538b1517d99fa85ec77bfac089ab8249e2708" ) > - 1
@@ -443,7 +443,8 @@ def test_integration_transaction_evaluate_cbor():
443443 # }
444444
445445 # Response with an ogmios error about missing input
446- assert result .result .EvaluationFailure .CannotCreateEvaluationContext .reason .find (
446+ script_failure = getattr (result .result .EvaluationFailure .ScriptFailures , 'spend:0' )
447+ assert script_failure .CannotCreateEvaluationContext .reason .find (
447448 'Unknown transaction input' ) > - 1
448449
449450
You can’t perform that action at this time.
0 commit comments