Skip to content

fix(container_registry_v1): Fix test_get_image_manifest to correctly … #11

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

Merged
merged 2 commits into from
Apr 13, 2023

Conversation

mikeyoung3k
Copy link
Contributor

@mikeyoung3k mikeyoung3k commented Apr 13, 2023

Fix test_get_image_manifest to correctly convert type if not dict

PR summary

Fixes the get_image_manifest_response test to read request.Result types properly

Fixes: https://github.ibm.com/alchemy-registry/team/issues/6432

PR Checklist

Please make sure that your PR fulfills the following requirements:

  • [ X ] The commit message follows the Angular Commit Message Guidelines.
  • [ X ] Tests for the changes have been added (for bug fixes / features)
  • [ X ] Docs have been added / updated (for bug fixes / features)

PR Type

  • [ X ] Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • New tests
  • Build/CI related changes
  • Documentation content changes
  • Other (please describe)

What is the current behavior?

Test failure due to attempting to use a "get" method on class that doesn't have "get"

What is the new behavior?

Create dict from json body if not already a dict

Does this PR introduce a breaking change?

  • Yes
  • [ X ] No

Other information

@mikeyoung3k mikeyoung3k force-pushed the fix_test_image_manifest branch from c147fed to 1952546 Compare April 13, 2023 13:31
Mike Young added 2 commits April 13, 2023 15:07
@mikeyoung3k mikeyoung3k force-pushed the fix_test_image_manifest branch from cf2bc6f to 1fe59c5 Compare April 13, 2023 14:07
@sjhx
Copy link
Member

sjhx commented Apr 13, 2023

I wonder if get_results() is obliged to return a dict ? I'm not python savy enough to know.

@mikeyoung3k
Copy link
Contributor Author

Assuming the type hints are accurate, it returns either a dict or a requests.Result:
https://github.com/IBM/python-sdk-core/blob/main/ibm_cloud_sdk_core/detailed_response.py#L49

Copy link
Member

@sjhx sjhx left a comment

Choose a reason for hiding this comment

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

LGTM

@mikeyoung3k mikeyoung3k merged commit 7cc4837 into main Apr 13, 2023
@mikeyoung3k mikeyoung3k deleted the fix_test_image_manifest branch April 13, 2023 15:54
@ibm-reggie
Copy link
Collaborator

🎉 This PR is included in version 0.0.9 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants