mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-13 21:49:26 +02:00
Improve error handling for auto tagging (#855)
This commit is contained in:
@@ -14,6 +14,20 @@ class AutoTaggingTestCase(TestCase):
|
||||
|
||||
self.assertEqual(tags, {"example"})
|
||||
|
||||
def test_auto_tag_by_domain_handles_invalid_urls(self):
|
||||
script = """
|
||||
example.com example
|
||||
test.com test
|
||||
"""
|
||||
|
||||
url = "https://"
|
||||
tags = auto_tagging.get_tags(script, url)
|
||||
self.assertEqual(tags, set([]))
|
||||
|
||||
url = "example.com"
|
||||
tags = auto_tagging.get_tags(script, url)
|
||||
self.assertEqual(tags, set([]))
|
||||
|
||||
def test_auto_tag_by_domain_works_with_port(self):
|
||||
script = """
|
||||
example.com example
|
||||
|
Reference in New Issue
Block a user