add unit tests to test importer deduplication#13372
Merged
rossops merged 8 commits intoDefectDojo:bugfixfrom Oct 14, 2025
Merged
add unit tests to test importer deduplication#13372rossops merged 8 commits intoDefectDojo:bugfixfrom
rossops merged 8 commits intoDefectDojo:bugfixfrom
Conversation
Maffooch
approved these changes
Oct 10, 2025
523931c to
64e120b
Compare
Contributor
|
Love this. Can't wait to see it come out of "Draft" |
blakeaowens
approved these changes
Oct 14, 2025
rossops
approved these changes
Oct 14, 2025
Maffooch
pushed a commit
to valentijnscholten/django-DefectDojo
that referenced
this pull request
Feb 16, 2026
…orters-unittests add unit tests to test importer deduplication
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There's a (very) comprehensive test suite to test the deduplication logic for all dedupe algorithm types in https://github.com/DefectDojo/django-DefectDojo/blob/master/unittests/test_deduplication_logic.py.
This tests deduplication logic by creating findings, triggering dedupe and assess the results.
What we also need is unit tests that perform a full import process and assess the dedeuplication logic of the importer. Currently this is identical to what happens when creating findings on their own. But this might change in a future PR where we optimize deduplication for batches of findings.
This PR adds these unit tests so we capture the current behaviour and can safely go for that batch dedupe PR.
We also capture the query counts and async counts. Existing counts have been raised slightly because we enabled dedupe.