feat(backend): enforce campaign scheduling, add reviewer queue filter, tactic order, duplicate-test counts
- start_execution now blocks a test from starting before its campaign's start_date, closing a gap where the field was persisted but never enforced - GET /tests gains a reviewer_id "my reviews" filter for the red_review/ blue_review lead-gate stage, distinct from pending_validation_side (which only ever covered the later in_review stage and ignored assignment entirely) - get_coverage_by_tactic now returns all 14 MITRE tactics in canonical kill-chain order instead of an alphabetical, partial list — the regular Dashboard and Executive Dashboard both consume this endpoint and previously disagreed on order/completeness - test-template listing now includes existing_test_count per technique so the catalog can warn before creating a likely-duplicate test
This commit is contained in:
@@ -60,7 +60,11 @@ def _make_user(role: str = "red_tech") -> MagicMock:
|
||||
|
||||
|
||||
def _make_db() -> MagicMock:
|
||||
return MagicMock()
|
||||
db = MagicMock()
|
||||
# start_execution's campaign-schedule lookup (.query(Campaign).join(...).filter(...).first())
|
||||
# defaults to "no campaign found" so unrelated tests aren't gated by a MagicMock date.
|
||||
db.query.return_value.join.return_value.filter.return_value.first.return_value = None
|
||||
return db
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user