@@ -345,7 +345,7 @@ def decorator(func):
345345
346346def test_app_mention_feedback_error_handling (mock_env ):
347347 """Test app mention feedback error handling"""
348- from app .slack .slack_handlers import app_mention_handler
348+ from app .slack .slack_handlers import mention_handler
349349
350350 mock_ack = Mock ()
351351 mock_client = Mock ()
@@ -354,7 +354,7 @@ def test_app_mention_feedback_error_handling(mock_env):
354354
355355 with patch ("app.slack.slack_handlers.store_feedback" ) as mock_store :
356356 mock_store .side_effect = Exception ("Storage failed" )
357- app_mention_handler (mock_event , mock_ack , mock_body , mock_client )
357+ mention_handler (mock_event , mock_ack , mock_body , mock_client )
358358 # Should still try to post message
359359 mock_client .chat_postMessage .assert_called_once ()
360360
@@ -363,7 +363,7 @@ def test_app_mention_feedback_error_handling(mock_env):
363363 mock_client .chat_postMessage .side_effect = Exception ("Post failed" )
364364
365365 with patch ("app.slack.slack_handlers.store_feedback" ):
366- app_mention_handler (mock_event , mock_ack , mock_body , mock_client )
366+ mention_handler (mock_event , mock_ack , mock_body , mock_client )
367367 # Should not raise exception
368368
369369
@@ -380,17 +380,17 @@ def test_dm_message_handler_feedback_error_handling(mock_env):
380380 mock_client .chat_postMessage .assert_called_once ()
381381
382382
383- def test_channel_message_handler_session_check_error (mock_env ):
384- """Test channel_message_handler session check error"""
385- from app .slack .slack_handlers import channel_message_handler
383+ def test_thread_message_handler_session_check_error (mock_env ):
384+ """Test thread_message_handler session check error"""
385+ from app .slack .slack_handlers import thread_message_handler
386386
387387 mock_client = Mock ()
388388 mock_event = {"text" : "follow up" , "channel" : "C789" , "thread_ts" : "123" , "user" : "U456" }
389389
390390 with patch ("app.core.config.table" ) as mock_table :
391391 mock_table .get_item .side_effect = Exception ("DB error" )
392392 # Should return early due to error
393- channel_message_handler (mock_event , "evt123" , mock_client )
393+ thread_message_handler (mock_event , "evt123" , mock_client )
394394
395395
396396def test_feedback_handler_unknown_action (mock_env ):
@@ -418,29 +418,29 @@ def test_feedback_handler_not_latest_message(mock_env):
418418 mock_ack .assert_called_once ()
419419
420420
421- def test_channel_message_handler_no_session (mock_env ):
422- """Test channel_message_handler when no session found"""
423- from app .slack .slack_handlers import channel_message_handler
421+ def test_thread_message_handler_no_session (mock_env ):
422+ """Test thread_message_handler when no session found"""
423+ from app .slack .slack_handlers import thread_message_handler
424424
425425 mock_client = Mock ()
426426 mock_event = {"text" : "follow up" , "channel" : "C789" , "thread_ts" : "123" , "user" : "U456" }
427427
428428 with patch ("app.core.config.table" ) as mock_table :
429429 mock_table .get_item .return_value = {} # No session
430- channel_message_handler (mock_event , "evt123" , mock_client )
430+ thread_message_handler (mock_event , "evt123" , mock_client )
431431
432432
433- def test_channel_message_handler_feedback_path (mock_env ):
434- """Test channel_message_handler feedback path"""
435- from app .slack .slack_handlers import channel_message_handler
433+ def test_thread_message_handler_feedback_path (mock_env ):
434+ """Test thread_message_handler feedback path"""
435+ from app .slack .slack_handlers import thread_message_handler
436436
437437 mock_client = Mock ()
438438 mock_event = {"text" : "feedback: channel feedback" , "channel" : "C789" , "thread_ts" : "123" , "user" : "U456" }
439439
440440 with patch ("app.core.config.table" ) as mock_table :
441441 mock_table .get_item .return_value = {"Item" : {"session_id" : "session123" }}
442442 # Just test that the function runs without error
443- channel_message_handler (mock_event , "evt123" , mock_client )
443+ thread_message_handler (mock_event , "evt123" , mock_client )
444444
445445
446446def test_dm_message_handler_normal_message (mock_env ):
@@ -455,9 +455,9 @@ def test_dm_message_handler_normal_message(mock_env):
455455 mock_trigger .assert_called_once ()
456456
457457
458- def test_app_mention_handler_normal_mention (mock_env ):
459- """Test app_mention_handler with normal mention"""
460- from app .slack .slack_handlers import app_mention_handler
458+ def test_mention_handler_normal_mention (mock_env ):
459+ """Test mention_handler with normal mention"""
460+ from app .slack .slack_handlers import mention_handler
461461
462462 mock_ack = Mock ()
463463 mock_client = Mock ()
@@ -467,7 +467,7 @@ def test_app_mention_handler_normal_mention(mock_env):
467467 with patch ("app.slack.slack_handlers._is_duplicate_event" , return_value = False ), patch (
468468 "app.slack.slack_handlers._trigger_async_processing"
469469 ) as mock_trigger :
470- app_mention_handler (mock_event , mock_ack , mock_body , mock_client )
470+ mention_handler (mock_event , mock_ack , mock_body , mock_client )
471471 mock_trigger .assert_called_once ()
472472
473473
0 commit comments