Skip to content

add-unit-test-ethereum-governance#1827

Merged
openminddev merged 2 commits intoOpenMind:mainfrom
Wanbogang:add-unit-test-ethereum-governance
Jan 26, 2026
Merged

add-unit-test-ethereum-governance#1827
openminddev merged 2 commits intoOpenMind:mainfrom
Wanbogang:add-unit-test-ethereum-governance

Conversation

@Wanbogang
Copy link
Copy Markdown
Contributor

This PR updates the unit tests for the GovernanceEthereum input plugin located in src/inputs/plugins/ethereum_governance.py.

  • Fixes tests related to load_rules_from_blockchain by mocking the decode_eth_response function to avoid complex ABI hex input issues.
  • Adjusts tests for decode_eth_response to focus on error handling paths that can be reliably tested (e.g., invalid hex input causing bytes.fromhex to fail).
  • Corrects assertion for default rpc_url value.
  • Adds notes regarding the fragility and potential bug in the decode_eth_response function's ABI parsing logic (see linked issue).

The original test cases attempting to validate specific decoded strings proved unreliable due to the complexity of crafting correct ABI-encoded hex input manually. The focus shifts to testing the overall flow and error handling.

@Wanbogang Wanbogang requested a review from a team as a code owner January 22, 2026 13:37
@github-actions github-actions Bot added python Python code tests Test files labels Jan 22, 2026
@openminddev openminddev merged commit 9005b01 into OpenMind:main Jan 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Python code tests Test files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants