@@ -1615,12 +1615,9 @@ async def noop_callback(contents, user, instance):
16151615
16161616# --- Follow-up suggestions tests ---
16171617
1618- def _get_footer_actions (msg ):
1619- """Get footer actions from message, falling back to footer_objects for older pmui."""
1620- try :
1621- return msg .footer_actions or []
1622- except AttributeError :
1623- return msg .footer_objects or []
1618+ def _get_footer_objects (msg ):
1619+ """Get footer objects from message."""
1620+ return msg .footer_objects or []
16241621
16251622
16261623def test_follow_up_suggestion_model ():
@@ -1663,7 +1660,7 @@ async def test_follow_up_icon_after_query(explorer_ui):
16631660
16641661 last_msg = ui .interface .objects [- 1 ]
16651662 follow_up_icons = [
1666- f for f in _get_footer_actions (last_msg )
1663+ f for f in _get_footer_objects (last_msg )
16671664 if getattr (f , 'name' , '' ) == "FollowUp"
16681665 ]
16691666 assert len (follow_up_icons ) == 1
@@ -1677,7 +1674,7 @@ async def test_follow_up_icon_not_on_error(explorer_ui_with_error):
16771674
16781675 last_msg = ui .interface .objects [- 1 ]
16791676 follow_up_icons = [
1680- f for f in _get_footer_actions (last_msg )
1677+ f for f in _get_footer_objects (last_msg )
16811678 if getattr (f , 'name' , '' ) == "FollowUp"
16821679 ]
16831680 assert len (follow_up_icons ) == 0
@@ -1699,7 +1696,7 @@ async def test_follow_up_icon_not_shown_without_pipeline(explorer_ui):
16991696
17001697 last_msg = ui .interface .objects [- 1 ]
17011698 follow_up_icons = [
1702- f for f in _get_footer_actions (last_msg )
1699+ f for f in _get_footer_objects (last_msg )
17031700 if getattr (f , 'name' , '' ) == "FollowUp"
17041701 ]
17051702 assert len (follow_up_icons ) == 0
@@ -1733,7 +1730,7 @@ async def test_follow_up_icon_description(explorer_ui):
17331730
17341731 last_msg = ui .interface .objects [- 1 ]
17351732 follow_up_icons = [
1736- f for f in _get_footer_actions (last_msg )
1733+ f for f in _get_footer_objects (last_msg )
17371734 if getattr (f , 'name' , '' ) == "FollowUp"
17381735 ]
17391736 assert len (follow_up_icons ) == 1
0 commit comments