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

chore: adding comments to test_sns_helper.py #111

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

drduhe
Copy link
Collaborator

@drduhe drduhe commented Oct 25, 2024

Issue #, if available: n/a

Notes

Enhanced the TestSnsHelper unit tests structure and comments to improve readability, consistency, and understanding. Added detailed comments to each test case and cleaned up the setup and teardown methods.

Changes

  1. General Code Cleanup:

    • Reformatted the code for better readability and consistent spacing.
    • Ensured line breaks between sections and methods to separate logic clearly.
  2. Added Docstrings and Comments:

    • Provided comprehensive docstrings for each test method, describing the purpose of the test and expected outcomes.
    • Added inline comments to clarify specific lines of code, such as explaining mock configurations and base64 encoding.
    • Included setup explanations to outline the mock AWS environment preparation, including SNS topic and SQS queue creation.
  3. Enhanced Test Clarity:

    • Added comments to explain the expected attributes in the test cases.
    • Clarified the behavior for handling invalid attribute types, ensuring only valid attributes are processed and published.
    • Specified the reasoning behind mock exception configurations in the failure test.

Checklist

Before you submit a pull request, please make sure you have the following:

  • Code changes are compact and well-structured to facilitate easy review
  • Changes are documented in the README.md and other relevant documentation pages
  • PR title and description accurately reflect the changes and are detailed enough for historical tracking
  • PR contains tests that cover all new code and the code has been manual tested
  • All new dependencies are declared (if any), and no unnecessary libraries are added
  • Performance impacts (if any) of the changes are evaluated and documented
  • Security implications of the changes (if any) are reviewed and addressed
  • I have read the Contributing Guidelines and agree to follow the Code of Conduct

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@drduhe drduhe merged commit e9ce2d4 into main Oct 29, 2024
2 checks passed
@drduhe drduhe deleted the chore/update-sns-helper-test-comments branch October 29, 2024 16:32
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.

2 participants