repo_id
stringclasses
400 values
commit_sha
stringclasses
400 values
commit_index
int32
0
951
in_repo_split
stringclasses
1 value
cross_repo_split
stringclasses
1 value
test_file
stringlengths
7
121
test_function
stringlengths
1
108
assertion_type
stringclasses
32 values
difficulty
stringclasses
8 values
context_lines
int32
3
600
prefix
large_stringlengths
44
113k
target
large_stringlengths
1
498
anchor_sha
stringclasses
400 values
anchor_index
int32
0
951
qna_source
stringclasses
1 value
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_search_tag.py
assertSelect
self.assertIsNotNone
variable
49
from bs4 import BeautifulSoup from django.template import Template, RequestContext from django.test import TestCase, RequestFactory from bookmarks.models import BookmarkSearch from bookmarks.tests.helpers import BookmarkFactoryMixin, HtmlTestMixin class BookmarkSearchTagTest(TestCase, BookmarkFactoryMixin, HtmlTestMi...
select)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_utils.py
test_humanize_absolute_date
self.assertEqual
variable
51
from unittest.mock import patch from dateutil.relativedelta import relativedelta from django.test import TestCase from django.utils import timezone from bookmarks.utils import ( humanize_absolute_date, humanize_relative_date, parse_timestamp, ) class UtilsTestCase(TestCase): def test_humanize_absolu...
result)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_search_tag.py
assertHiddenInput
self.assertIsNotNone
variable
31
from bs4 import BeautifulSoup from django.template import Template, RequestContext from django.test import TestCase, RequestFactory from bookmarks.models import BookmarkSearch from bookmarks.tests.helpers import BookmarkFactoryMixin, HtmlTestMixin class BookmarkSearchTagTest(TestCase, BookmarkFactoryMixin, HtmlTestMi...
element)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmarks_list_template.py
assertFavicon
self.assertIsNotNone
variable
152
import datetime from typing import Type from dateutil.relativedelta import relativedelta from django.contrib.auth.models import AnonymousUser from django.http import HttpResponse from django.template import Template, RequestContext from django.test import TestCase, RequestFactory from django.urls import reverse from d...
favicon)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_user_profile_model.py
test_create_user_should_init_profile
self.assertIsNotNone
variable
12
from django.contrib.auth.models import User from django.test import TestCase from bookmarks.models import UserProfile class UserProfileTestCase(TestCase): def test_create_user_should_init_profile(self): user = User.objects.create_user("testuser", "test@example.com", "password123") profile = UserP...
profile)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_assets_service.py
test_create_snapshot_asset
self.assertEqual
variable
48
import datetime import gzip import os from datetime import timedelta from unittest import mock from django.core.files.uploadedfile import SimpleUploadedFile from django.test import TestCase from django.utils import timezone from bookmarks.models import BookmarkAsset from bookmarks.services import assets from bookmark...
bookmark)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_assets_api.py
test_upload_asset
self.assertEqual
variable
51
import io from django.core.files.uploadedfile import SimpleUploadedFile from django.test import override_settings from django.urls import reverse from rest_framework import status from bookmarks.models import BookmarkAsset from bookmarks.tests.helpers import LinkdingApiTestCase, BookmarkFactoryMixin class BookmarkAs...
bookmark)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmarks_api.py
test_check_returns_scraped_metadata_if_url_is_not_bookmarked
self.assertIsNotNone
variable
108
import datetime import io import urllib.parse from collections import OrderedDict from unittest.mock import patch, ANY from django.contrib.auth.models import User from django.test import override_settings from django.urls import reverse from django.utils import timezone from rest_framework import status from rest_fram...
metadata)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmarks_list_template.py
inline_bookmark_description_test
self.assertIsNotNone
variable
343
import datetime from typing import Type from dateutil.relativedelta import relativedelta from django.contrib.auth.models import AnonymousUser from django.http import HttpResponse from django.template import Template, RequestContext from django.test import TestCase, RequestFactory from django.urls import reverse from d...
tag_link)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_oidc_support.py
test_username_should_use_email_by_default
self.assertEqual
variable
25
import importlib import os from django.test import TestCase, override_settings from django.urls import URLResolver from bookmarks import utils class OidcSupportTest(TestCase): @override_settings(LD_ENABLE_OIDC=True, OIDC_USERNAME_CLAIM="email") def test_username_should_use_email_by_default(self): cl...
username)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_queries.py
test_query_bookmark_tags_filter_shared
self.assertCountEqual
variable
176
import datetime import operator from django.db.models import QuerySet from django.test import TestCase from django.utils import timezone from bookmarks import queries from bookmarks.models import BookmarkSearch, UserProfile from bookmarks.tests.helpers import BookmarkFactoryMixin, random_sentence from bookmarks.utils...
all_tags)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_auto_tagging.py
test_auto_tag_by_domain_handles_invalid_urls
self.assertEqual
func_call
15
from bookmarks.services import auto_tagging from django.test import TestCase class AutoTaggingTestCase(TestCase): def test_auto_tag_by_domain_handles_invalid_urls(self): script = """ example.com example test.com test """ url = "https://" tags = auto_tagging...
set([]))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/helpers.py
assertVisibleTags
self.assertEqual
func_call
30
import gzip import logging import os import random import shutil import tempfile from datetime import datetime from typing import List from unittest import TestCase from bs4 import BeautifulSoup from django.conf import settings from django.test import override_settings from django.utils import timezone from django.uti...
len(tags))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_tag_cloud_template.py
assertTagGroups
self.assertEqual
func_call
39
from typing import List, Type from django.contrib.auth.models import User, AnonymousUser from django.http import HttpResponse from django.template import Template, RequestContext from django.test import TestCase, RequestFactory from bookmarks.middlewares import LinkdingMiddleware from bookmarks.models import Bookmark...
len(groups))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_index_view.py
assertVisibleBundles
self.assertEqual
func_call
41
import urllib.parse from django.contrib.auth.models import User from django.test import TestCase from django.urls import reverse from bookmarks.models import BookmarkSearch, UserProfile from bookmarks.tests.helpers import ( BookmarkFactoryMixin, BookmarkListTestMixin, TagCloudTestMixin, ) class BookmarkI...
len(bundles))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_website_loader.py
test_load_page_returns_content
self.assertEqual
func_call
48
from unittest import mock from bookmarks.services import website_loader from django.test import TestCase class WebsiteLoaderTestCase(TestCase): def setUp(self): # clear cached metadata before test run website_loader._load_website_metadata_cached.cache_clear() def render_html_document( ...
len(content))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/helpers.py
assertVisibleBookmarks
self.assertEqual
func_call
34
import gzip import logging import os import random import shutil import tempfile from datetime import datetime from typing import List from unittest import TestCase from bs4 import BeautifulSoup from django.conf import settings from django.test import override_settings from django.utils import timezone from django.uti...
len(bookmarks))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_parser.py
assertTagsEqual
self.assertEqual
func_call
15
from typing import List from django.test import TestCase from bookmarks.models import parse_tag_string from bookmarks.services.parser import NetscapeBookmark from bookmarks.services.parser import parse from bookmarks.tests.helpers import ImportTestMixin, BookmarkHtmlTag class ParserTestCase(TestCase, ImportTestMixin...
len(html_tags))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_search_tag.py
assertRadioGroup
self.assertTrue
func_call
61
from bs4 import BeautifulSoup from django.template import Template, RequestContext from django.test import TestCase, RequestFactory from bookmarks.models import BookmarkSearch from bookmarks.tests.helpers import BookmarkFactoryMixin, HtmlTestMixin class BookmarkSearchTagTest(TestCase, BookmarkFactoryMixin, HtmlTestMi...
len(radios) > 0)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_favicon_loader.py
test_load_favicon_creates_folder_if_not_exists
self.assertFalse
func_call
58
import io import os.path import time import tempfile from pathlib import Path from unittest import mock from django.conf import settings from django.test import TestCase, override_settings from bookmarks.services import favicon_loader mock_icon_data = b"mock_icon" class FaviconLoaderTestCase(TestCase): def setU...
folder.exists())
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_preview_image_loader.py
test_load_preview_image_creates_folder_if_not_exists
self.assertFalse
func_call
66
import io import os import tempfile from pathlib import Path from unittest import mock from django.conf import settings from django.test import TestCase from bookmarks.services import preview_image_loader mock_image_data = b"mock_image" class PreviewImageLoaderTestCase(TestCase): def setUp(self) -> None: ...
folder.exists())
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_search_tag.py
assertNoRadioGroup
self.assertTrue
func_call
72
from bs4 import BeautifulSoup from django.template import Template, RequestContext from django.test import TestCase, RequestFactory from bookmarks.models import BookmarkSearch from bookmarks.tests.helpers import BookmarkFactoryMixin, HtmlTestMixin class BookmarkSearchTagTest(TestCase, BookmarkFactoryMixin, HtmlTestMi...
len(radios) == 0)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_validation.py
test_bookmark_form_should_validate_required_fields
self.assertIn
func_call
43
import datetime from django.core.exceptions import ValidationError from django.test import TestCase, override_settings from django.test.client import RequestFactory from bookmarks.forms import BookmarkForm from bookmarks.models import Bookmark from bookmarks.tests.helpers import BookmarkFactoryMixin ENABLED_URL_VALI...
str(form.errors))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_favicon_loader.py
test_load_favicon_creates_single_icon_for_same_base_url
self.assertEqual
func_call
58
import io import os.path import time import tempfile from pathlib import Path from unittest import mock from django.conf import settings from django.test import TestCase, override_settings from bookmarks.services import favicon_loader mock_icon_data = b"mock_icon" class FaviconLoaderTestCase(TestCase): def setU...
self.count_icons())
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests_e2e/e2e_test_bookmark_page_bulk_edit.py
test_select_all_toggles_all_checkboxes
self.assertEqual
func_call
46
from django.urls import reverse from playwright.sync_api import sync_playwright, expect from bookmarks.tests_e2e.helpers import LinkdingE2ETestCase from bookmarks.models import Bookmark class BookmarkPagePartialUpdatesE2ETestCase(LinkdingE2ETestCase): def setup_test_data(self): self.setup_numbered_bookmar...
checkboxes.count())
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_preview_image_loader.py
test_guess_file_extension
self.assertEqual
func_call
66
import io import os import tempfile from pathlib import Path from unittest import mock from django.conf import settings from django.test import TestCase from bookmarks.services import preview_image_loader mock_image_data = b"mock_image" class PreviewImageLoaderTestCase(TestCase): def setUp(self) -> None: ...
file.split(".")[-1])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_create_initial_superuser_command.py
test_create_with_password
self.assertEqual
func_call
19
import os from unittest import mock from django.test import TestCase from bookmarks.models import User from bookmarks.management.commands.create_initial_superuser import Command class TestCreateInitialSuperuserCommand(TestCase): @mock.patch.dict( os.environ, {"LD_SUPERUSER_NAME": "john", "LD_SUP...
User.objects.count())
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bundles_index_view.py
assertBundleOrder
self.assertEqual
func_call
18
from django.test import TestCase from django.urls import reverse from bookmarks.models import BookmarkBundle from bookmarks.tests.helpers import BookmarkFactoryMixin class BundleIndexViewTestCase(TestCase, BookmarkFactoryMixin): def setUp(self) -> None: user = self.get_or_create_test_user() self....
len(expected_bundles))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_index_view.py
assertVisibleBundles
self.assertEqual
func_call
48
import urllib.parse from django.contrib.auth.models import User from django.test import TestCase from django.urls import reverse from bookmarks.models import BookmarkSearch, UserProfile from bookmarks.tests.helpers import ( BookmarkFactoryMixin, BookmarkListTestMixin, TagCloudTestMixin, ) class BookmarkI...
list_item.text.strip())
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests_e2e/e2e_test_bundle_preview.py
assertVisibleBookmarks
self.assertEqual
func_call
10
from django.urls import reverse from playwright.sync_api import sync_playwright, expect from bookmarks.tests_e2e.helpers import LinkdingE2ETestCase class BookmarkItemE2ETestCase(LinkdingE2ETestCase): def assertVisibleBookmarks(self, bookmarks): self.assertEqual(len(bookmarks),
self.count_bookmarks())
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_search_tag.py
assertRadioGroup
self.assertTrue
func_call
66
from bs4 import BeautifulSoup from django.template import Template, RequestContext from django.test import TestCase, RequestFactory from bookmarks.models import BookmarkSearch from bookmarks.tests.helpers import BookmarkFactoryMixin, HtmlTestMixin class BookmarkSearchTagTest(TestCase, BookmarkFactoryMixin, HtmlTestMi...
radio.has_attr("checked"))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_assets_api.py
test_delete_asset
self.assertFalse
func_call
50
import io from django.core.files.uploadedfile import SimpleUploadedFile from django.test import override_settings from django.urls import reverse from rest_framework import status from bookmarks.models import BookmarkAsset from bookmarks.tests.helpers import LinkdingApiTestCase, BookmarkFactoryMixin class BookmarkAs...
self.has_asset_file(asset))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_create_initial_superuser_command.py
test_create_with_password
self.assertTrue
func_call
23
import os from unittest import mock from django.test import TestCase from bookmarks.models import User from bookmarks.management.commands.create_initial_superuser import Command class TestCreateInitialSuperuserCommand(TestCase): @mock.patch.dict( os.environ, {"LD_SUPERUSER_NAME": "john", "LD_SUP...
user.has_usable_password())
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_search_tag.py
assertSelect
self.assertTrue
func_call
55
from bs4 import BeautifulSoup from django.template import Template, RequestContext from django.test import TestCase, RequestFactory from bookmarks.models import BookmarkSearch from bookmarks.tests.helpers import BookmarkFactoryMixin, HtmlTestMixin class BookmarkSearchTagTest(TestCase, BookmarkFactoryMixin, HtmlTestMi...
option.has_attr("selected"))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_login_view.py
test_should_show_oidc_login_when_enabled
self.assertEqual
func_call
22
from django.test import TestCase, override_settings from django.urls import path, include from bookmarks.tests.helpers import BookmarkFactoryMixin, HtmlTestMixin from bookmarks.urls import urlpatterns as base_patterns urlpatterns = base_patterns + [path("oidc/", include("mozilla_django_oidc.urls"))] class LoginViewT...
oidc_login_link.get("data-turbo"))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_create_initial_superuser_command.py
test_create_with_password
self.assertTrue
func_call
24
import os from unittest import mock from django.test import TestCase from bookmarks.models import User from bookmarks.management.commands.create_initial_superuser import Command class TestCreateInitialSuperuserCommand(TestCase): @mock.patch.dict( os.environ, {"LD_SUPERUSER_NAME": "john", "LD_SUP...
user.check_password("password123"))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_monolith_service.py
test_create_snapshot
self.assertTrue
func_call
32
import gzip import os from unittest import mock import subprocess from django.test import TestCase from bookmarks.services import monolith class MonolithServiceTestCase(TestCase): html_content = "<html><body><h1>Hello, World!</h1></body></html>" html_filepath = "temp.html.gz" temp_html_filepath = "temp.h...
os.path.exists(self.html_filepath))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_index_view.py
test_apply_search_preferences
self.assertEqual
func_call
55
import urllib.parse from django.contrib.auth.models import User from django.test import TestCase from django.urls import reverse from bookmarks.models import BookmarkSearch, UserProfile from bookmarks.tests.helpers import ( BookmarkFactoryMixin, BookmarkListTestMixin, TagCloudTestMixin, ) class BookmarkI...
reverse("linkding:bookmarks.index"))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_shared_view.py
test_apply_search_preferences
self.assertEqual
func_call
60
import urllib.parse from typing import List from django.contrib.auth.models import User from django.test import TestCase from django.urls import reverse from bookmarks.models import Bookmark, BookmarkSearch, Tag, UserProfile from bookmarks.tests.helpers import ( BookmarkFactoryMixin, BookmarkListTestMixin, ...
reverse("linkding:bookmarks.shared"))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_archived_view.py
test_apply_search_preferences
self.assertEqual
func_call
40
import urllib.parse from django.contrib.auth.models import User from django.test import TestCase from django.urls import reverse from bookmarks.models import BookmarkSearch, UserProfile from bookmarks.tests.helpers import ( BookmarkFactoryMixin, BookmarkListTestMixin, TagCloudTestMixin, ) class BookmarkA...
reverse("linkding:bookmarks.archived"))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_preview_image_loader.py
assertImageExists
self.assertTrue
func_call
53
import io import os import tempfile from pathlib import Path from unittest import mock from django.conf import settings from django.test import TestCase from bookmarks.services import preview_image_loader mock_image_data = b"mock_image" class PreviewImageLoaderTestCase(TestCase): def setUp(self) -> None: ...
self.get_image_path(filename).exists())
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_preview_image_loader.py
assertNoImageExists
self.assertFalse
func_call
57
import io import os import tempfile from pathlib import Path from unittest import mock from django.conf import settings from django.test import TestCase from bookmarks.services import preview_image_loader mock_image_data = b"mock_image" class PreviewImageLoaderTestCase(TestCase): def setUp(self) -> None: ...
os.listdir(settings.LD_PREVIEW_FOLDER))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_app_options.py
test_empty_csrf_trusted_origins
self.assertFalse
func_call
15
import importlib import os from unittest import mock from django.test import TestCase class AppOptionsTestCase(TestCase): def setUp(self) -> None: self.settings_module = importlib.import_module("bookmarks.settings.base") def test_empty_csrf_trusted_origins(self): module = importlib.reload(sel...
hasattr(module, "CSRF_TRUSTED_ORIGINS"))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_archived_view.py
test_turbo_frame_details_modal_renders_details_modal_update
self.assertIsNone
func_call
46
import urllib.parse from django.contrib.auth.models import User from django.test import TestCase from django.urls import reverse from bookmarks.models import BookmarkSearch, UserProfile from bookmarks.tests.helpers import ( BookmarkFactoryMixin, BookmarkListTestMixin, TagCloudTestMixin, ) class BookmarkA...
soup.select_one("#tag-cloud-container"))
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_assets_service.py
test_create_snapshot_asset
self.assertIsNone
complex_expr
55
import datetime import gzip import os from datetime import timedelta from unittest import mock from django.core.files.uploadedfile import SimpleUploadedFile from django.test import TestCase from django.utils import timezone from bookmarks.models import BookmarkAsset from bookmarks.services import assets from bookmark...
asset.id)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_edit_view.py
test_should_edit_bookmark
self.assertEqual
complex_expr
39
from django.contrib.auth.models import User from django.test import TestCase from django.urls import reverse from bookmarks.models import build_tag_string from bookmarks.tests.helpers import BookmarkFactoryMixin class BookmarkEditViewTestCase(TestCase, BookmarkFactoryMixin): def setUp(self) -> None: user...
self.user)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_new_view.py
test_should_create_new_bookmark
self.assertEqual
complex_expr
37
from django.test import TestCase from django.urls import reverse from bookmarks.models import Bookmark from bookmarks.tests.helpers import BookmarkFactoryMixin class BookmarkNewViewTestCase(TestCase, BookmarkFactoryMixin): def setUp(self) -> None: user = self.get_or_create_test_user() self.client...
self.user)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_search_form.py
test_initial_values
self.assertEqual
complex_expr
32
from django.test import TestCase from bookmarks.models import BookmarkSearch, BookmarkSearchForm from bookmarks.tests.helpers import BookmarkFactoryMixin class BookmarkSearchFormTest(TestCase, BookmarkFactoryMixin): def test_initial_values(self): # no params search = BookmarkSearch() form ...
bundle.id)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bundles_index_view.py
assertBundleOrder
self.assertEqual
complex_expr
20
from django.test import TestCase from django.urls import reverse from bookmarks.models import BookmarkBundle from bookmarks.tests.helpers import BookmarkFactoryMixin class BundleIndexViewTestCase(TestCase, BookmarkFactoryMixin): def setUp(self) -> None: user = self.get_or_create_test_user() self....
bundle.id)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bundles_new_view.py
test_should_create_new_bundle
self.assertEqual
complex_expr
34
from django.test import TestCase from django.urls import reverse from bookmarks.models import BookmarkBundle from bookmarks.tests.helpers import BookmarkFactoryMixin class BundleNewViewTestCase(TestCase, BookmarkFactoryMixin): def setUp(self) -> None: user = self.get_or_create_test_user() self.cl...
self.user)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_settings_general_view.py
test_enable_favicons_should_schedule_icon_update
assert_*
complex_expr
86
import hashlib import random from unittest.mock import patch, Mock import requests from django.test import TestCase, override_settings from django.urls import reverse from requests import RequestException from bookmarks.models import UserProfile, GlobalSettings from bookmarks.services import tasks from bookmarks.test...
self.user)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_settings_integrations_view.py
test_should_generate_api_token_if_not_exists
self.assertEqual
complex_expr
22
from django.test import TestCase from django.urls import reverse from rest_framework.authtoken.models import Token from bookmarks.tests.helpers import BookmarkFactoryMixin from bookmarks.models import FeedToken class SettingsIntegrationsViewTestCase(TestCase, BookmarkFactoryMixin): def setUp(self) -> None: ...
self.user)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_tags_service.py
test_get_or_create_tag_should_create_new_tag
self.assertEqual
complex_expr
23
import datetime from django.test import TestCase from django.utils import timezone from bookmarks.models import Tag from bookmarks.services.tags import get_or_create_tag, get_or_create_tags from bookmarks.tests.helpers import BookmarkFactoryMixin class TagServiceTestCase(TestCase, BookmarkFactoryMixin): def set...
self.user)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_assets_service.py
test_create_snapshot
self.assertTrue
complex_expr
82
import datetime import gzip import os from datetime import timedelta from unittest import mock from django.core.files.uploadedfile import SimpleUploadedFile from django.test import TestCase from django.utils import timezone from bookmarks.models import BookmarkAsset from bookmarks.services import assets from bookmark...
asset.gzip)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_assets_api.py
assertAsset
self.assertEqual
complex_expr
17
import io from django.core.files.uploadedfile import SimpleUploadedFile from django.test import override_settings from django.urls import reverse from rest_framework import status from bookmarks.models import BookmarkAsset from bookmarks.tests.helpers import LinkdingApiTestCase, BookmarkFactoryMixin class BookmarkAs...
data["id"])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_assets_api.py
test_upload_asset
self.assertFalse
complex_expr
56
import io from django.core.files.uploadedfile import SimpleUploadedFile from django.test import override_settings from django.urls import reverse from rest_framework import status from bookmarks.models import BookmarkAsset from bookmarks.tests.helpers import LinkdingApiTestCase, BookmarkFactoryMixin class BookmarkAs...
asset.gzip)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_search_model.py
test_from_request_ignores_invalid_bundle_param
self.assertIsNone
complex_expr
17
from django.http import QueryDict from django.test import TestCase from bookmarks.models import BookmarkSearch from bookmarks.tests.helpers import BookmarkFactoryMixin class BookmarkSearchModelTest(TestCase, BookmarkFactoryMixin): def test_from_request_ignores_invalid_bundle_param(self): self.setup_bundl...
search.bundle)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_create_initial_superuser_command.py
test_create_with_password
self.assertEqual
complex_expr
22
import os from unittest import mock from django.test import TestCase from bookmarks.models import User from bookmarks.management.commands.create_initial_superuser import Command class TestCreateInitialSuperuserCommand(TestCase): @mock.patch.dict( os.environ, {"LD_SUPERUSER_NAME": "john", "LD_SUP...
user.username)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_parser.py
assertTagsEqual
self.assertEqual
complex_expr
18
from typing import List from django.test import TestCase from bookmarks.models import parse_tag_string from bookmarks.services.parser import NetscapeBookmark from bookmarks.services.parser import parse from bookmarks.tests.helpers import ImportTestMixin, BookmarkHtmlTag class ParserTestCase(TestCase, ImportTestMixin...
html_tag.href)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_tags_service.py
test_get_or_create_tag_should_return_existing_tag
self.assertEqual
complex_expr
23
import datetime from django.test import TestCase from django.utils import timezone from bookmarks.models import Tag from bookmarks.services.tags import get_or_create_tag, get_or_create_tags from bookmarks.tests.helpers import BookmarkFactoryMixin class TagServiceTestCase(TestCase, BookmarkFactoryMixin): def set...
second_tag.id)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_assets_api.py
assertAsset
self.assertEqual
complex_expr
26
import io from django.core.files.uploadedfile import SimpleUploadedFile from django.test import override_settings from django.urls import reverse from rest_framework import status from bookmarks.models import BookmarkAsset from bookmarks.tests.helpers import LinkdingApiTestCase, BookmarkFactoryMixin class BookmarkAs...
data["status"])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_parser.py
assertTagsEqual
self.assertEqual
complex_expr
19
from typing import List from django.test import TestCase from bookmarks.models import parse_tag_string from bookmarks.services.parser import NetscapeBookmark from bookmarks.services.parser import parse from bookmarks.tests.helpers import ImportTestMixin, BookmarkHtmlTag class ParserTestCase(TestCase, ImportTestMixin...
html_tag.title)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_website_loader.py
test_load_website_metadata
self.assertEqual
complex_expr
48
from unittest import mock from bookmarks.services import website_loader from django.test import TestCase class WebsiteLoaderTestCase(TestCase): def setUp(self): # clear cached metadata before test run website_loader._load_website_metadata_cached.cache_clear() def render_html_document( ...
metadata.title)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_assets.py
test_save_updates_file_size
self.assertIsNone
complex_expr
29
import os from django.conf import settings from django.test import TestCase from bookmarks.services import bookmarks from bookmarks.tests.helpers import BookmarkFactoryMixin class BookmarkAssetsTestCase(TestCase, BookmarkFactoryMixin): def setUp(self): self.setup_temp_assets_dir() def setup_asset_fi...
asset.file_size)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_edit_view.py
test_should_edit_unread_state
self.assertTrue
complex_expr
37
from django.contrib.auth.models import User from django.test import TestCase from django.urls import reverse from bookmarks.models import build_tag_string from bookmarks.tests.helpers import BookmarkFactoryMixin class BookmarkEditViewTestCase(TestCase, BookmarkFactoryMixin): def setUp(self) -> None: user...
bookmark.unread)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_edit_view.py
test_should_edit_shared_state
self.assertTrue
complex_expr
37
from django.contrib.auth.models import User from django.test import TestCase from django.urls import reverse from bookmarks.models import build_tag_string from bookmarks.tests.helpers import BookmarkFactoryMixin class BookmarkEditViewTestCase(TestCase, BookmarkFactoryMixin): def setUp(self) -> None: user...
bookmark.shared)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_new_view.py
test_should_create_new_unread_bookmark
self.assertTrue
complex_expr
37
from django.test import TestCase from django.urls import reverse from bookmarks.models import Bookmark from bookmarks.tests.helpers import BookmarkFactoryMixin class BookmarkNewViewTestCase(TestCase, BookmarkFactoryMixin): def setUp(self) -> None: user = self.get_or_create_test_user() self.client...
bookmark.unread)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_new_view.py
test_should_create_new_shared_bookmark
self.assertTrue
complex_expr
37
from django.test import TestCase from django.urls import reverse from bookmarks.models import Bookmark from bookmarks.tests.helpers import BookmarkFactoryMixin class BookmarkNewViewTestCase(TestCase, BookmarkFactoryMixin): def setUp(self) -> None: user = self.get_or_create_test_user() self.client...
bookmark.shared)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_search_tag.py
test_modified_indicator
self.assertNotIn
complex_expr
91
from bs4 import BeautifulSoup from django.template import Template, RequestContext from django.test import TestCase, RequestFactory from bookmarks.models import BookmarkSearch from bookmarks.tests.helpers import BookmarkFactoryMixin, HtmlTestMixin class BookmarkSearchTagTest(TestCase, BookmarkFactoryMixin, HtmlTestMi...
button["class"])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_assets_api.py
assertAsset
self.assertEqual
complex_expr
18
import io from django.core.files.uploadedfile import SimpleUploadedFile from django.test import override_settings from django.urls import reverse from rest_framework import status from bookmarks.models import BookmarkAsset from bookmarks.tests.helpers import LinkdingApiTestCase, BookmarkFactoryMixin class BookmarkAs...
data["bookmark"])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_edit_view.py
test_should_edit_bookmark
self.assertEqual
complex_expr
40
from django.contrib.auth.models import User from django.test import TestCase from django.urls import reverse from bookmarks.models import build_tag_string from bookmarks.tests.helpers import BookmarkFactoryMixin class BookmarkEditViewTestCase(TestCase, BookmarkFactoryMixin): def setUp(self) -> None: user...
form_data["url"])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_parser.py
assertTagsEqual
self.assertEqual
complex_expr
24
from typing import List from django.test import TestCase from bookmarks.models import parse_tag_string from bookmarks.services.parser import NetscapeBookmark from bookmarks.services.parser import parse from bookmarks.tests.helpers import ImportTestMixin, BookmarkHtmlTag class ParserTestCase(TestCase, ImportTestMixin...
html_tag.to_read)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_parser.py
assertTagsEqual
self.assertEqual
complex_expr
25
from typing import List from django.test import TestCase from bookmarks.models import parse_tag_string from bookmarks.services.parser import NetscapeBookmark from bookmarks.services.parser import parse from bookmarks.tests.helpers import ImportTestMixin, BookmarkHtmlTag class ParserTestCase(TestCase, ImportTestMixin...
html_tag.private)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_tags_service.py
test_get_or_create_tag_should_handle_legacy_dbs_with_existing_duplicates
self.assertEqual
complex_expr
23
import datetime from django.test import TestCase from django.utils import timezone from bookmarks.models import Tag from bookmarks.services.tags import get_or_create_tag, get_or_create_tags from bookmarks.tests.helpers import BookmarkFactoryMixin class TagServiceTestCase(TestCase, BookmarkFactoryMixin): def set...
retrieved_tag.id)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_assets_api.py
assertAsset
self.assertEqual
complex_expr
22
import io from django.core.files.uploadedfile import SimpleUploadedFile from django.test import override_settings from django.urls import reverse from rest_framework import status from bookmarks.models import BookmarkAsset from bookmarks.tests.helpers import LinkdingApiTestCase, BookmarkFactoryMixin class BookmarkAs...
data["file_size"])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bundles_new_view.py
test_should_create_new_bundle
self.assertEqual
complex_expr
35
from django.test import TestCase from django.urls import reverse from bookmarks.models import BookmarkBundle from bookmarks.tests.helpers import BookmarkFactoryMixin class BundleNewViewTestCase(TestCase, BookmarkFactoryMixin): def setUp(self) -> None: user = self.get_or_create_test_user() self.cl...
form_data["name"])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_monolith_service.py
test_create_snapshot
self.assertEqual
complex_expr
37
import gzip import os from unittest import mock import subprocess from django.test import TestCase from bookmarks.services import monolith class MonolithServiceTestCase(TestCase): html_content = "<html><body><h1>Hello, World!</h1></body></html>" html_filepath = "temp.html.gz" temp_html_filepath = "temp.h...
self.html_content)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_assets_api.py
assertAsset
self.assertEqual
complex_expr
23
import io from django.core.files.uploadedfile import SimpleUploadedFile from django.test import override_settings from django.urls import reverse from rest_framework import status from bookmarks.models import BookmarkAsset from bookmarks.tests.helpers import LinkdingApiTestCase, BookmarkFactoryMixin class BookmarkAs...
data["asset_type"])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_settings_general_view.py
test_update_profile
self.assertEqual
complex_expr
112
import hashlib import random from unittest.mock import patch, Mock import requests from django.test import TestCase, override_settings from django.urls import reverse from requests import RequestException from bookmarks.models import UserProfile, GlobalSettings from bookmarks.services import tasks from bookmarks.test...
form_data["theme"])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_toasts_view.py
test_acknowledge_toast
self.assertTrue
complex_expr
44
from django.contrib.auth.models import User from django.test import TestCase from django.urls import reverse from bookmarks.models import Toast from bookmarks.tests.helpers import ( BookmarkFactoryMixin, random_sentence, disable_logging, ) class ToastsViewTestCase(TestCase, BookmarkFactoryMixin): def...
toast.acknowledged)
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_action_view.py
test_can_only_bulk_tag_own_bookmarks
self.assertCountEqual
collection
62
from unittest.mock import patch from django.contrib.auth.models import User from django.core.files.uploadedfile import SimpleUploadedFile from django.forms import model_to_dict from django.http import HttpResponse from django.test import TestCase, override_settings from django.urls import reverse from bookmarks.model...
[])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_search_model.py
test_query_params
self.assertEqual
collection
13
from django.http import QueryDict from django.test import TestCase from bookmarks.models import BookmarkSearch from bookmarks.tests.helpers import BookmarkFactoryMixin class BookmarkSearchModelTest(TestCase, BookmarkFactoryMixin): def test_query_params(self): # no params search = BookmarkSearch()...
{})
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmarks_api.py
test_check_returns_no_auto_tags_if_none_configured
self.assertCountEqual
collection
97
import datetime import io import urllib.parse from collections import OrderedDict from unittest.mock import patch, ANY from django.contrib.auth.models import User from django.test import override_settings from django.urls import reverse from django.utils import timezone from rest_framework import status from rest_fram...
[])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmarks_service.py
test_tag_bookmarks_should_only_tag_specified_bookmarks
self.assertCountEqual
collection
67
from unittest.mock import patch from django.test import TestCase from django.utils import timezone from bookmarks.models import Bookmark, Tag from bookmarks.services import tasks from bookmarks.services import website_loader from bookmarks.services.bookmarks import ( create_bookmark, update_bookmark, arch...
[])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_parser.py
test_no_bookmarks
self.assertEqual
collection
31
from typing import List from django.test import TestCase from bookmarks.models import parse_tag_string from bookmarks.services.parser import NetscapeBookmark from bookmarks.services.parser import parse from bookmarks.tests.helpers import ImportTestMixin, BookmarkHtmlTag class ParserTestCase(TestCase, ImportTestMixin...
[])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_queries.py
test_query_bookmarks_untagged_should_not_be_combinable_with_tags
self.assertCountEqual
collection
174
import datetime import operator from django.db.models import QuerySet from django.test import TestCase from django.utils import timezone from bookmarks import queries from bookmarks.models import BookmarkSearch, UserProfile from bookmarks.tests.helpers import BookmarkFactoryMixin, random_sentence from bookmarks.utils...
[])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_tags_model.py
test_parse_tag_string_handles_invalid_input
self.assertListEqual
collection
9
from django.test import TestCase from bookmarks.models import parse_tag_string class TagTestCase(TestCase): def test_parse_tag_string_handles_invalid_input(self): self.assertListEqual(parse_tag_string(None),
[])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_auto_tagging.py
test_auto_tag_by_domain_and_path
self.assertEqual
collection
17
from bookmarks.services import auto_tagging from django.test import TestCase class AutoTaggingTestCase(TestCase): def test_auto_tag_by_domain_and_path(self): script = """ example.com/one one example.com/two two test.com test """ url = "https://example.co...
{"one"})
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_auto_tagging.py
test_auto_tag_by_domain_work_with_idn_domains
self.assertEqual
collection
15
from bookmarks.services import auto_tagging from django.test import TestCase class AutoTaggingTestCase(TestCase): def test_auto_tag_by_domain_work_with_idn_domains(self): script = """ रजिस्ट्री.भारत tag1 """ url = "https://www.xn--81bg3cc2b2bk5hb.xn--h2brj9c/" tags = a...
{"tag1"})
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_auto_tagging.py
test_auto_tag_by_domain
self.assertEqual
collection
15
from bookmarks.services import auto_tagging from django.test import TestCase class AutoTaggingTestCase(TestCase): def test_auto_tag_by_domain(self): script = """ example.com example test.com test """ url = "https://example.com/" tags = auto_tagging.get_tags(...
{"example"})
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_auto_tagging.py
test_auto_tag_with_url_fragment_partial_match
self.assertEqual
collection
15
from bookmarks.services import auto_tagging from django.test import TestCase class AutoTaggingTestCase(TestCase): def test_auto_tag_with_url_fragment_partial_match(self): script = """ example.com/#/section section """ url = "https://example.com/#/section/1" tags = auto...
{"section"})
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_tags_service.py
test_get_or_create_tags_should_deduplicate_tags
self.assertListEqual
collection
22
import datetime from django.test import TestCase from django.utils import timezone from bookmarks.models import Tag from bookmarks.services.tags import get_or_create_tag, get_or_create_tags from bookmarks.tests.helpers import BookmarkFactoryMixin class TagServiceTestCase(TestCase, BookmarkFactoryMixin): def set...
[books_tag])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_auto_tagging.py
test_auto_tag_with_url_fragment
self.assertEqual
collection
16
from bookmarks.services import auto_tagging from django.test import TestCase class AutoTaggingTestCase(TestCase): def test_auto_tag_with_url_fragment(self): script = """ example.com/#/section/1 section1 example.com/#/section/2 section2 """ url = "https://example.com...
{"section1"})
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_search_model.py
test_modified_params
self.assertCountEqual
collection
28
from django.http import QueryDict from django.test import TestCase from bookmarks.models import BookmarkSearch from bookmarks.tests.helpers import BookmarkFactoryMixin class BookmarkSearchModelTest(TestCase, BookmarkFactoryMixin): def test_modified_params(self): # no params bookmark_search = Book...
["q", "sort"])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_search_form.py
test_hidden_fields
self.assertCountEqual
collection
48
from django.test import TestCase from bookmarks.models import BookmarkSearch, BookmarkSearchForm from bookmarks.tests.helpers import BookmarkFactoryMixin class BookmarkSearchFormTest(TestCase, BookmarkFactoryMixin): def test_hidden_fields(self): # no modified params search = BookmarkSearch() ...
[form["sort"]])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_search_tag.py
assertUnmodifiedLabel
self.assertEqual
collection
77
from bs4 import BeautifulSoup from django.template import Template, RequestContext from django.test import TestCase, RequestFactory from bookmarks.models import BookmarkSearch from bookmarks.tests.helpers import BookmarkFactoryMixin, HtmlTestMixin class BookmarkSearchTagTest(TestCase, BookmarkFactoryMixin, HtmlTestMi...
["form-label"])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_auto_tagging.py
test_auto_tag_by_domain_path_and_qs_works_with_encoded_url
self.assertEqual
collection
16
from bookmarks.services import auto_tagging from django.test import TestCase class AutoTaggingTestCase(TestCase): def test_auto_tag_by_domain_path_and_qs_works_with_encoded_url(self): script = """ example.com/page?a=йцу tag1 example.com/page?a=%D0%B9%D1%86%D1%83 tag2 """ ...
{"tag1", "tag2"})
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_auto_tagging.py
test_auto_tag_by_domain_ignores_schema
self.assertEqual
collection
16
from bookmarks.services import auto_tagging from django.test import TestCase class AutoTaggingTestCase(TestCase): def test_auto_tag_by_domain_ignores_schema(self): script = """ https://example.com/ https http://example.com/ http """ url = "http://example.com/" ...
{"https", "http"})
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_tags_service.py
test_get_or_create_tags_should_return_tags
self.assertListEqual
collection
23
import datetime from django.test import TestCase from django.utils import timezone from bookmarks.models import Tag from bookmarks.services.tags import get_or_create_tag, get_or_create_tags from bookmarks.tests.helpers import BookmarkFactoryMixin class TagServiceTestCase(TestCase, BookmarkFactoryMixin): def set...
[books_tag, movies_tag])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor
sissbruecker/linkding
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
train
train
bookmarks/tests/test_bookmark_search_form.py
test_hidden_fields
self.assertCountEqual
collection
18
from django.test import TestCase from bookmarks.models import BookmarkSearch, BookmarkSearchForm from bookmarks.tests.helpers import BookmarkFactoryMixin class BookmarkSearchFormTest(TestCase, BookmarkFactoryMixin): def test_hidden_fields(self): # no modified params search = BookmarkSearch() ...
[form["q"], form["sort"]])
1672dc01521a9ac56ef07e4c2c2c09d3a5c3c44f
177
v2_extractor_at_anchor