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

Safe Connections Report unit tests #2515

Merged
merged 8 commits into from
Feb 20, 2024
Merged

Conversation

madelondohmen
Copy link
Contributor

Changes

This PR creates unit tests for Safe Connections Report.

It also makes some changes in the report itself:

  • One of the returns "finding_types" was unnecessary and never used, so this part is deleted.

Issue link

Closes #2479


Code Checklist

  • All the commits in this PR are properly PGP-signed and verified.
  • This PR only contains functionality relevant to the issue; tickets have been created for newly discovered issues.
  • I have written unit tests for the changes or fixes I made.
  • For any non-trivial functionality, I have added integration and/or end-to-end tests.
  • I have performed a self-review of my code and refactored it to the best of my abilities.

Communication

  • I have informed others of any required .env changes files if required and changed the .env-dist accordingly.
  • I have made corresponding changes to the documentation, if necessary.
  • I have included comments in the code to elaborate on what is not self-evident from the code itself, including references to issues and discussions online, or implicit behavior of an interface.

Checklist for code reviewers:

Copy-paste the checklist from the docs/source/templates folder into your comment.


Checklist for QA:

Copy-paste the checklist from the docs/source/templates folder into your comment.

@madelondohmen madelondohmen requested a review from a team as a code owner February 15, 2024 15:05
Copy link
Contributor

@ammar92 ammar92 left a comment

Choose a reason for hiding this comment

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

It looks good in general, but the tests can be improved. It tests the size of the expected output, but apart from that it doesn't really validate the expected output. A good test would validate the output size, (some) content (and order if it matters).

For example, in test_safe_connections_report_multiple_finding_types you could verify if the report indeed contains one of the OOI fixtures.

rocky/tests/conftest.py Show resolved Hide resolved
ammar92
ammar92 previously approved these changes Feb 19, 2024
Copy link
Contributor

@ammar92 ammar92 left a comment

Choose a reason for hiding this comment

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

No more remarks

@ammar92 ammar92 merged commit 213ef3d into main Feb 20, 2024
10 checks passed
@ammar92 ammar92 deleted the feature/safe-connections-unit-tests branch February 20, 2024 09:35
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.

Unit tests for Safe Connections Report
3 participants