@@ -415,12 +415,9 @@ async def test_warn_callback_success(
415415 mock_chat .full_name = "Test User"
416416 mock_context .bot .get_chat .return_value = mock_chat
417417
418- with (
419- patch ("bot.handlers.check.get_settings" , return_value = mock_settings ),
420- patch (
421- "bot.handlers.check.get_group_registry" ,
422- return_value = mock_registry ,
423- ),
418+ with patch (
419+ "bot.handlers.check.get_group_registry" ,
420+ return_value = mock_registry ,
424421 ):
425422 await handle_warn_callback (update , mock_context )
426423
@@ -458,12 +455,9 @@ async def test_warn_callback_success_missing_photo_only(
458455 mock_chat .username = "testuser"
459456 mock_context .bot .get_chat .return_value = mock_chat
460457
461- with (
462- patch ("bot.handlers.check.get_settings" , return_value = mock_settings ),
463- patch (
464- "bot.handlers.check.get_group_registry" ,
465- return_value = mock_registry ,
466- ),
458+ with patch (
459+ "bot.handlers.check.get_group_registry" ,
460+ return_value = mock_registry ,
467461 ):
468462 await handle_warn_callback (update , mock_context )
469463
@@ -533,12 +527,9 @@ async def test_warn_callback_send_message_error(
533527 mock_context .bot .get_chat .return_value = mock_chat
534528 mock_context .bot .send_message .side_effect = Exception ("Failed to send" )
535529
536- with (
537- patch ("bot.handlers.check.get_settings" , return_value = mock_settings ),
538- patch (
539- "bot.handlers.check.get_group_registry" ,
540- return_value = mock_registry ,
541- ),
530+ with patch (
531+ "bot.handlers.check.get_group_registry" ,
532+ return_value = mock_registry ,
542533 ):
543534 await handle_warn_callback (update , mock_context )
544535
@@ -565,12 +556,9 @@ async def test_warn_callback_timeout(
565556 mock_context .bot .get_chat .return_value = mock_chat
566557 mock_context .bot .send_message .side_effect = TimedOut ()
567558
568- with (
569- patch ("bot.handlers.check.get_settings" , return_value = mock_settings ),
570- patch (
571- "bot.handlers.check.get_group_registry" ,
572- return_value = mock_registry ,
573- ),
559+ with patch (
560+ "bot.handlers.check.get_group_registry" ,
561+ return_value = mock_registry ,
574562 ):
575563 await handle_warn_callback (update , mock_context )
576564
@@ -596,12 +584,9 @@ async def test_warn_callback_get_chat_timeout(
596584
597585 mock_context .bot .get_chat .side_effect = TimedOut ()
598586
599- with (
600- patch ("bot.handlers.check.get_settings" , return_value = mock_settings ),
601- patch (
602- "bot.handlers.check.get_group_registry" ,
603- return_value = mock_registry ,
604- ),
587+ with patch (
588+ "bot.handlers.check.get_group_registry" ,
589+ return_value = mock_registry ,
605590 ):
606591 await handle_warn_callback (update , mock_context )
607592
0 commit comments