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

test: add test for get_private_keys #17

Merged
merged 3 commits into from
Jul 5, 2024
Merged

test: add test for get_private_keys #17

merged 3 commits into from
Jul 5, 2024

Conversation

athith-g
Copy link
Collaborator

@athith-g athith-g commented Jun 27, 2024

Adds tests for get_private_keys in decrypt.py.

Copy link

sourcery-ai bot commented Jun 27, 2024

Reviewer's Guide by Sourcery

This pull request adds a new test file test_decrypt.py under tests/decryption/ to provide unit tests for the get_private_keys function in decrypt.py. The tests cover scenarios with empty input lists and various combinations of public and private key files, ensuring that only private keys are retrieved.

File-Level Changes

Files Changes
tests/decryption/test_decrypt.py Added comprehensive tests for the get_private_keys function in decrypt.py, including tests for empty input and various file combinations.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @athith-g - I've reviewed your changes and found some issues that need to be addressed.

Blocking issues:

  • Hard-coded private key found. (link)
  • Hard-coded private key found. (link)
  • Hard-coded private key found. (link)
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🔴 Security: 3 blocking issues
  • 🟡 Testing: 3 issues found
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

tests/decryption/test_decrypt.py Show resolved Hide resolved
tests/decryption/test_decrypt.py Show resolved Hide resolved
tests/decryption/test_decrypt.py Show resolved Hide resolved
inputs/bob.sec Show resolved Hide resolved
inputs/bob.sec Show resolved Hide resolved
inputs/bob.sec Show resolved Hide resolved
@athith-g athith-g merged commit 3e2064d into main Jul 5, 2024
1 check passed
@athith-g athith-g deleted the test_get_pk branch July 5, 2024 14:14
athith-g added a commit that referenced this pull request Jul 5, 2024
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