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(decrypt): add integration tests #26

Merged
merged 35 commits into from
Aug 8, 2024
Merged

test(decrypt): add integration tests #26

merged 35 commits into from
Aug 8, 2024

Conversation

athith-g
Copy link
Collaborator

@athith-g athith-g commented Aug 6, 2024

Adds integration tests for decrypt.py.

Also:

  • Moves INPUT_DIR and INPUT_TEXT to utils.py (references in other files to these constants will be changed in separate PR)
  • Moves fixture_encrypted_files to conftest.py (Usage in test_decrypt.py will be removed in separate PR)
  • Creates hello3.c4gh file that was encrypted with bob.pk for use in integration test
  • Minor change to error message in decrypt.py

Summary by Sourcery

Add integration tests for decrypt.py and refactor test utilities and fixtures for better organization and reusability.

Enhancements:

  • Move INPUT_DIR and INPUT_TEXT constants to utils.py for better reusability.
  • Move fixture_encrypted_files to conftest.py for shared usage across tests.
  • Minor change to error message in decrypt.py to include file name.

Tests:

  • Add integration tests for decrypt.py to ensure proper decryption functionality.
  • Create hello3.c4gh file encrypted with bob.pk for use in integration tests.

Copy link

sourcery-ai bot commented Aug 6, 2024

Reviewer's Guide by Sourcery

This pull request adds integration tests for decrypt.py, ensuring that the decryption functionality works as expected. It also refactors some test utilities and fixtures for better code organization and reusability. Additionally, a minor change was made to the error message in decrypt.py to include the file name instead of the full path.

File-Level Changes

Files Changes
tests/utils.py
tests/conftest.py
Refactored test utilities and fixtures to improve code organization and reusability.
tests/decryption/test_integration.py Added comprehensive integration tests for decrypt.py to ensure proper decryption functionality.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • 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 they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟡 Testing: 5 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.

crypt4gh_middleware/decrypt.py Outdated Show resolved Hide resolved
tests/decryption/test_integration.py Show resolved Hide resolved
tests/decryption/test_integration.py Show resolved Hide resolved
tests/decryption/test_integration.py Outdated Show resolved Hide resolved
tests/decryption/test_integration.py Outdated Show resolved Hide resolved
tests/decryption/test_integration.py Show resolved Hide resolved
tests/conftest.py Show resolved Hide resolved
tests/decryption/test_integration.py Show resolved Hide resolved
tests/decryption/test_integration.py Show resolved Hide resolved
@uniqueg uniqueg changed the title test: add integration tests for decrypt.py test(decrypt): add integration tests Aug 7, 2024
crypt4gh_middleware/decrypt.py Outdated Show resolved Hide resolved
tests/conftest.py Show resolved Hide resolved
@athith-g athith-g requested a review from uniqueg August 7, 2024 22:18
@athith-g athith-g merged commit 40c1ab7 into main Aug 8, 2024
1 check passed
@athith-g athith-g deleted the decrypt_integration branch August 8, 2024 15:59
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