def test_format_footer_text_group_event(group_event): # Group events already include the user in the field value. assert format_footer_text(group_event) == Embed.Empty
def test_format_footer_text_group_event_reason(group_event): group_event.type = "remove" group_event.content = "Resigned" assert format_footer_text(group_event) == "NAT \"Resigned\""
def test_format_footer_text_kudosu_given(kudosu_gain_event): assert format_footer_text(kudosu_gain_event) == "sometwo"
def test_format_footer_text_kudosu_denied(kudosu_gain_event): kudosu_gain_event.type = "kudosu-deny" kudosu_gain_event.user = None assert format_footer_text(kudosu_gain_event) == Embed.Empty
def test_format_footer_text_preview(suggestion_event): suggestion_event.content = "04:25:218 (3,4) - the guitar is really strong here so mapping to the red beats only feels unfitting" assert format_footer_text( suggestion_event ) == f"{suggestion_event.user} {format_preview(suggestion_event.content)}"
def test_format_footer_text_no_comment(suggestion_event): suggestion_event.content = "" assert format_footer_text(suggestion_event) == "someone"
def test_format_footer_text_no_user(qualify_event): assert format_footer_text(qualify_event) == Embed.Empty
def test_format_footer_text_newspost(newspost_event): # Newsposts already include their preview in the post itself, so we skip this. assert format_footer_text(newspost_event) == "sometwo"
def test_format_footer_text_difficulty_reopen(suggestion_event): suggestion_event.type = types.REOPEN suggestion_event.discussion.tab = "timeline" suggestion_event.discussion.difficulty = "Someone's Expert" assert format_footer_text(suggestion_event) == "someone \"hi\""
def test_format_footer_text_difficulty(suggestion_event): suggestion_event.discussion.tab = "timeline" suggestion_event.discussion.difficulty = "Someone's Expert" assert format_footer_text( suggestion_event) == "someone \"hi\" [Someone's Expert]"
def test_format_footer_text(suggestion_event): assert format_footer_text(suggestion_event) == "someone \"hi\""