@@ -384,29 +384,6 @@ def test_auto_move_when_failing_within_threshold(alice, in_progress_cf, open_cf,
384384 assert QueuedMail .objects .count () == 0
385385
386386
387- def test_no_auto_move_without_next_commitfest (alice , in_progress_cf , topic ):
388- """Patches should not be auto-moved if there's no next commitfest."""
389- patch = Patch .objects .create (
390- name = "Active Patch No Next CF" ,
391- topic = topic ,
392- lastmail = datetime .now () - timedelta (days = 5 ),
393- )
394- patch .authors .add (alice )
395- PatchOnCommitFest .objects .create (
396- patch = patch ,
397- commitfest = in_progress_cf ,
398- enterdate = datetime .now (),
399- status = PatchOnCommitFest .STATUS_REVIEW ,
400- )
401-
402- moved_patch_ids = in_progress_cf .auto_move_active_patches ()
403- in_progress_cf .send_closure_notifications (moved_patch_ids )
404-
405- # Patch should NOT be moved (no next CF)
406- patch .refresh_from_db ()
407- assert patch .current_commitfest ().id == in_progress_cf .id
408-
409-
410387def test_no_auto_move_with_null_lastmail (alice , in_progress_cf , open_cf , topic ):
411388 """Patches with no email activity (null lastmail) should NOT be auto-moved."""
412389 patch = Patch .objects .create (
@@ -458,15 +435,23 @@ def test_auto_move_patch_without_cfbot_branch(alice, in_progress_cf, open_cf, to
458435
459436
460437def test_regular_cf_does_not_move_to_draft_cf (alice , in_progress_cf , topic ):
461- """Regular commitfest should not move patches to a draft commitfest ."""
462- # Create only a draft CF as the "next" option ( should be ignored)
463- CommitFest .objects .create (
438+ """Regular commitfest should move patches to the next regular CF, not a draft CF ."""
439+ # Create a draft CF - should be ignored for regular CF patches
440+ draft_cf = CommitFest .objects .create (
464441 name = "2025-05-draft" ,
465442 status = CommitFest .STATUS_OPEN ,
466443 startdate = date (2025 , 5 , 1 ),
467444 enddate = date (2025 , 5 , 31 ),
468445 draft = True ,
469446 )
447+ # Create a regular CF - this is where patches should go
448+ regular_cf = CommitFest .objects .create (
449+ name = "2025-01" ,
450+ status = CommitFest .STATUS_OPEN ,
451+ startdate = date (2025 , 1 , 1 ),
452+ enddate = date (2025 , 1 , 31 ),
453+ draft = False ,
454+ )
470455
471456 patch = Patch .objects .create (
472457 name = "Regular Patch" ,
@@ -483,10 +468,11 @@ def test_regular_cf_does_not_move_to_draft_cf(alice, in_progress_cf, topic):
483468
484469 moved_patch_ids = in_progress_cf .auto_move_active_patches ()
485470
486- # Should not be moved since only draft CF is available
487- assert patch .id not in moved_patch_ids
471+ # Should be moved to regular CF, not draft CF
472+ assert patch .id in moved_patch_ids
488473 patch .refresh_from_db ()
489- assert patch .current_commitfest ().id == in_progress_cf .id
474+ assert patch .current_commitfest ().id == regular_cf .id
475+ assert patch .current_commitfest ().id != draft_cf .id
490476
491477
492478def test_draft_cf_moves_active_patches_to_next_draft (alice , bob , topic ):
0 commit comments