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

fix bug in GenericRequest.to_dict() #391

Merged
merged 5 commits into from May 24, 2022
Merged

fix bug in GenericRequest.to_dict() #391

merged 5 commits into from May 24, 2022

Conversation

khancode
Copy link
Collaborator

@khancode khancode commented May 18, 2022

High Level Overview of Change

Fix bug in GenericRequest.to_dict()

Context of Change

There's an initialization bug in GenericRequest where command param doesn't get set to method:

>>> GenericRequest(command='validator_list_sites').to_dict()
{'method': 'zzgeneric_request', 'command': 'validator_list_sites'}

Correct state:

>>> GenericRequest(command='validator_list_sites').to_dict()
{'method': 'validator_list_sites'}

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Tests (You added tests for code that already exists, or your new feature included in this PR)
  • Documentation Updates
  • Release

Test Plan

Added unit test to check GenericRequest state after initialization.

Copy link
Collaborator

@mvadari mvadari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

@khancode khancode requested a review from mvadari May 23, 2022 23:20
@khancode khancode changed the title fix GenericRequest initialization bug fix bug in GenericRequest.to_dict() May 24, 2022
@khancode khancode merged commit 5a784b0 into master May 24, 2022
@khancode khancode deleted the fix-generic-request branch May 24, 2022 21:20
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.

None yet

3 participants