blockfrost-python
blockfrost-python copied to clipboard
Add governance endpoints
This pull request adds the new Cardano governance API endpoints and improves transaction-related test coverage by using temporary files for transaction submission and evaluation. The changes ensure the correctness of the governance API integration and enhance the reliability of transaction file handling in the test suite.
Cardano Governance API Testing
- Added a new test suite
tests/test_cardano_governance.pywith extensive unit and integration tests for all Cardano governance-related API endpoints, including proposals, votes, DReps, and committee members. - Updated the
blockfrost/api/__init__.pyroot import to include all governance-related API functions, ensuring their availability in the main API interface.
Transaction File Handling in Tests
- Updated
test_transaction_submitintests/test_cardano_transactions.pyto use a temporary file containing valid transaction CBOR data instead of a static file path, improving test reliability and realism. [1] [2] - Updated
test_utils_transaction_evaluateintests/test_cardano_utils.pyto use a temporary file with valid transaction CBOR data for evaluating transactions, aligning with best practices for file-based operations in tests. - Added a sample
tx_cbortransaction string totests/test_cardano_utils.pyfor use in transaction-related tests.
This fixes #45