コード例 #1
0
def test_format_field_name_group_event(group_event):
    assert format_field_name(group_event).startswith(
        ":performing_arts:\u2000Added (< <t:")
    assert format_field_name(group_event).endswith(":R>)")
コード例 #2
0
def test_format_field_name_newspost(newspost_event):
    assert format_field_name(newspost_event).startswith("title (<t:")
    assert format_field_name(newspost_event).endswith(":R>)")
コード例 #3
0
def test_format_field_name_qualify(qualify_event):
    assert format_field_name(qualify_event).startswith(
        ":heart:\u2000Qualified (<t:")
    assert format_field_name(qualify_event).endswith(":R>)")
コード例 #4
0
def test_format_field_name(suggestion_event):
    assert format_field_name(suggestion_event).startswith(
        ":yellow_circle:\u2000Suggestion (<t:")
    assert format_field_name(suggestion_event).endswith(":R>)")
コード例 #5
0
def test_format_field_name_dont_skip_timeago(suggestion_event):
    suggestion_event.time = datetime.utcnow() - timedelta(minutes=20)
    assert format_field_name(
        suggestion_event, skip_timeago_if_recent=True
    ) == ":yellow_circle:\u2000Suggestion (**20 minutes** ago)"
コード例 #6
0
def test_format_field_name_newspost(newspost_event):
    assert format_field_name(newspost_event).startswith("title (**")
    assert format_field_name(newspost_event).endswith("** ago)")