Skip to content

test: extend and consolidate tag inheritance tests into test_tag_inheritance.py#14771

Open
valentijnscholten wants to merge 4 commits intoDefectDojo:devfrom
valentijnscholten:tag-inheritance-tests
Open

test: extend and consolidate tag inheritance tests into test_tag_inheritance.py#14771
valentijnscholten wants to merge 4 commits intoDefectDojo:devfrom
valentijnscholten:tag-inheritance-tests

Conversation

@valentijnscholten
Copy link
Copy Markdown
Member

@valentijnscholten valentijnscholten commented Apr 28, 2026

Summary

  • Moves all tag-inheritance-related tests into a single unittests/test_tag_inheritance.py file, consolidating from test_tags.py, test_bulk_locations.py, and the now-deleted test_tags_signals.py
  • Adds three new pure-unit test classes (no DB) covering tags_signals.py internals: TestGetProducts, TestInheritProductTags, TestPropagateInheritanceEarlyExit

Move all tag-inheritance-related tests into a single file:
- InheritedTagsTests, InheritedTagsImportMixin, InheritedTagsImportTestAPI,
  InheritedTagsImportTestUI from test_tags.py
- TestTagInheritanceOnPersist from test_bulk_locations.py
- test_tags_signals.py (new unit tests, now absorbed)

Add new unit test classes covering tags_signals.py internals:
- TestGetProducts — isinstance routing for all model types
- TestInheritProductTags — per-product and system-wide flag gating
- TestPropagateInheritanceEarlyExit — early-exit short-circuit logic

Add class-level docstrings throughout for clarity.
Fix SSL redirect in InheritedTagsImportTestAPI/UI setUp.
@valentijnscholten valentijnscholten changed the title test: consolidate tag inheritance tests into test_tag_inheritance.py test: extend and consolidate tag inheritance tests into test_tag_inheritance.py Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant