Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed erroneous tests (Issue # 53) #54

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

DarbyBurbidge
Copy link

@DarbyBurbidge DarbyBurbidge commented Jun 4, 2022

Issue #53: Tests 2, 3, and 6 in asa_faucet_test.py give error: "KeyError: 0"

This pull request fixes it so all tests pass.

Changes

  • Change all calls from:
get_key_from_state(state, b'key_name')

to:

state['key_name']
  • Remove the get_key_from_state() from akita_inu_asa_utils.py as no other tests call the function.

Possible problems

The original function iterated over the state array, decoding a b64 key stored in state and then made sure to match the decoded string against the given key. The error is either that there is no [i] element to iterate over, or there is no ['key'] element. I attempted to lookup the nature of the state key-pairs but AlgodClient.account_info (from the sdk docs) just says "returns account information." Either way, the proposed change appears to fix it.

I'm not sure if removing it has bigger implications, but so far tests are green with the proposed change.

@DarbyBurbidge DarbyBurbidge changed the title fixed erroneous tests fixed erroneous tests (Issue # 53) Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant