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

Can we add tests for cloudtrail.utils with Improved Mocking and Edge Case Handling #9173

Open
imSanko opened this issue Dec 27, 2024 · 0 comments
Labels
needs-triage This issue or PR still needs to be triaged. source-distribution cli v2 source distritbution related issues

Comments

@imSanko
Copy link

imSanko commented Dec 27, 2024

Describe the issue

Replaced manual mocking with the @mock.patch decorator for more explicit and isolated testing.
Added new tests to cover edge cases:

  1. Handling of empty responses from get_caller_identity.
  2. Invalid ARNs passed to get_account_id_from_arn.
  3. Missing trails in the response of describe_trails.
  4. Verified error handling by testing for expected exceptions (KeyError and ValueError) in scenarios with malformed inputs or empty responses.

Additional Information/Context

No response

CLI version used

Last Update

Environment details (OS name and version, etc.)

UNIX

@imSanko imSanko added needs-triage This issue or PR still needs to be triaged. source-distribution cli v2 source distritbution related issues labels Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage This issue or PR still needs to be triaged. source-distribution cli v2 source distritbution related issues
Projects
None yet
Development

No branches or pull requests

1 participant