mirror of
https://github.com/sissbruecker/linkding.git
synced 2026-02-28 06:53:12 +08:00
16 lines
469 B
Python
16 lines
469 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")
|