mirror of
https://github.com/sissbruecker/linkding
synced 2024-11-22 11:23:02 +00:00
fe7ddbe645
* add migration for merging fields * remove usage of website title and description * keep empty website title and description in API for compatibility * restore scraping in API and add option for disabling it * document API scraping behavior * remove deprecated fields from API docs * improve form layout * cleanup migration * cleanup website loader * update tests
16 lines
470 B
Python
16 lines
470 B
Python
from django.test import TestCase
|
|
|
|
from bookmarks.models import Bookmark
|
|
|
|
|
|
class BookmarkTestCase(TestCase):
|
|
|
|
def test_bookmark_resolved_title(self):
|
|
bookmark = Bookmark(
|
|
title="Custom title",
|
|
url="https://example.com",
|
|
)
|
|
self.assertEqual(bookmark.resolved_title, "Custom title")
|
|
|
|
bookmark = Bookmark(title="", url="https://example.com")
|
|
self.assertEqual(bookmark.resolved_title, "https://example.com")
|