Skip to content

Add exhaustive pytest test suite with fixes#2

Open
deacon-mp wants to merge 3 commits intomasterfrom
test/exhaustive-pytest-coverage
Open

Add exhaustive pytest test suite with fixes#2
deacon-mp wants to merge 3 commits intomasterfrom
test/exhaustive-pytest-coverage

Conversation

@deacon-mp
Copy link
Copy Markdown
Owner

Mirror of mitre/debrief PR mitre#78 for Copilot review

- tests/conftest.py: shared fixtures with mock builders for operations, agents, links, facts
- tests/test_debrief_svc.py: DebriefService (generate_ttps, d3 graph builders, static helpers)
- tests/test_debrief_gui.py: DebriefGui (sanitize, template markers, runtime agents, pretty name)
- tests/test_hook.py: plugin hook (enable routes, cache init, metadata)
- tests/test_story.py: Story object (append, page break, table objects, header logo)
- tests/test_base_report_section.py: BaseReportSection (status names, table gen, grouping)
- tests/test_sections.py: all 11 debrief-sections modules (agents, graphs, tables, TTPs)
- tests/test_attack_mapper_extended.py: Attack18Map, index_bundle, fetch_and_cache, utilities
- .caldera-shim/: lightweight Caldera framework stubs for isolated testing
- pytest.ini, tox.ini: test configuration
- Replace hardcoded /tmp/debrief-pytest symlink with relative path ../../
- Fix tautological assertion in test_header_logo_path_default (was always true)
- Strengthen test_strategy_det_id_normalization to verify DET0012 exists
- Rewrite test_save_svgs to actually call _save_svgs and verify file write
- Tighten test_value_truncation to assert truncation directly
- Tighten test_generate_ttp_detection_info_with_links to assert href
- Fix file handle leak in c_story.py adjust_icon_svgs
- Add viewBox null check in c_story.py
- Fix stale op_id bug in debrief_svc.py build_steps_d3
- Pin tox dependency versions to avoid breakage from major version bumps
- Replace brittle AttributeError test with explicit hasattr checks for
  get_description delegation pattern
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.

1 participant