summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndrew Godwin2022-11-29 09:44:22 -0700
committerAndrew Godwin2022-11-29 09:44:37 -0700
commit8139ccffdb6450f4413eff4a9d880b6741c7dd01 (patch)
treea114cb6d56cc57dfcaf00327fa80071173f39dd2 /tests
parent17107618a00cadf93ac4803910509e793a80774d (diff)
downloadtakahe-8139ccffdb6450f4413eff4a9d880b6741c7dd01.tar.gz
takahe-8139ccffdb6450f4413eff4a9d880b6741c7dd01.tar.bz2
takahe-8139ccffdb6450f4413eff4a9d880b6741c7dd01.zip
Fix hashtag extraction
Diffstat (limited to 'tests')
-rw-r--r--tests/activities/models/test_hashtag.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/activities/models/test_hashtag.py b/tests/activities/models/test_hashtag.py
index 32742d6..91af45c 100644
--- a/tests/activities/models/test_hashtag.py
+++ b/tests/activities/models/test_hashtag.py
@@ -9,11 +9,13 @@ def test_hashtag_from_content():
"with",
]
assert Hashtag.hashtags_from_content("#hashtag.") == ["hashtag"]
- assert Hashtag.hashtags_from_content("More text\n#one # two ##three #hashtag;") == [
+ assert Hashtag.hashtags_from_content("More text\n#one # two ##three #hashtag!") == [
"hashtag",
"one",
"three",
]
+ assert Hashtag.hashtags_from_content("my #html loves   entities") == ["html"]
+ assert Hashtag.hashtags_from_content("<span class='hash'>#</span>tag") == ["tag"]
def test_linkify_hashtag():