1
0
Fork 0

Render hashtag links with data-mention="hashtag" attribute

This commit is contained in:
Christof Dorner 2023-02-18 00:18:32 +01:00
parent 276b255f32
commit f3334b1550
5 changed files with 13 additions and 7 deletions

View file

@ -359,8 +359,10 @@ class StatusViews(TestCase):
hashtag_new = models.Hashtag.objects.filter(name="#new").first()
self.assertEqual(
status.content,
f'<p>this is an <a href="{hashtag_exising.remote_id}">#existing</a> '
+ f'hashtag, this one is <a href="{hashtag_new.remote_id}">#new</a>.</p>',
"<p>this is an "
+ f'<a href="{hashtag_exising.remote_id}" data-mention="hashtag">'
+ "#existing</a> hashtag, this one is "
+ f'<a href="{hashtag_new.remote_id}" data-mention="hashtag">#new</a>.</p>',
)
def test_find_hashtags(self, *_):