From 5b82c76defd8016df137087e5ce55b44cf017399 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Mon, 5 Dec 2022 20:26:21 -0700 Subject: Shorten mention names when linkified Fixes #121 --- tests/activities/models/test_post.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/activities/models/test_post.py b/tests/activities/models/test_post.py index 00db61b..06d26ed 100644 --- a/tests/activities/models/test_post.py +++ b/tests/activities/models/test_post.py @@ -56,7 +56,7 @@ def test_linkify_mentions_remote(identity, remote_identity): post.mentions.add(identity) assert ( post.safe_content_remote() - == '

@test@example.com, welcome!

' + == '

@test, welcome!

' ) # Test that they don't get touched without a mention post = Post.objects.create( @@ -103,7 +103,7 @@ def test_linkify_mentions_local(identity, remote_identity): post.mentions.add(identity) assert ( post.safe_content_local() - == '

@test@example.com, welcome!

' + == '

@test, welcome!

' ) # Test a full username (remote) with no

post = Post.objects.create( @@ -112,10 +112,7 @@ def test_linkify_mentions_local(identity, remote_identity): local=True, ) post.mentions.add(remote_identity) - assert ( - post.safe_content_local() - == '@test@remote.test hello!' - ) + assert post.safe_content_local() == '@test hello!' # Test that they don't get touched without a mention post = Post.objects.create( content="

@test@example.com, welcome!

", -- cgit v1.2.3