MCPcopy Create free account

hub / github.com/internetarchive/openlibrary / functions

Functions6,179 in github.com/internetarchive/openlibrary

Functiontest_get_readable_count_reuses_num_found_when_already_readable
When the search is already readable-scoped (has_fulltext=true), the main result count IS the readable count — no extra Solr query is issued.
openlibrary/plugins/worksearch/tests/test_worksearch.py:199
Methodtest_get_requires_authentication
(self, fastapi_client)
openlibrary/tests/fastapi/test_importapi.py:73
Methodtest_get_returns_import_result
(self, mock_import_request)
openlibrary/tests/fastapi/test_importapi.py:128
Methodtest_get_seed
(self, get_patched_hide)
scripts/tests/test_obfi.py:64
Methodtest_get_seed
requests.get has been patched to return a seed of 1234.
scripts/tests/test_obfi.py:132
Functiontest_get_seeds
()
openlibrary/tests/core/test_lists_engine.py:4
Methodtest_get_series_seeds_public_success
(self, fastapi_client, monkeypatch)
openlibrary/tests/fastapi/test_list_seeds.py:19
Methodtest_get_series_seeds_user_success
(self, fastapi_client, monkeypatch)
openlibrary/tests/fastapi/test_list_seeds.py:31
Functiontest_get_solr_updater_lag_event
Test that solr updater lag is calculated correctly from ISO timestamps.
scripts/monitoring/tests/test_solr_updater_monitor.py:11
Functiontest_get_statement_values
()
openlibrary/tests/core/test_wikidata.py:123
Methodtest_get_subfield_value
(self)
openlibrary/catalog/marc/tests/test_marc_binary.py:62
Methodtest_get_tar_filename
(self, monkeypatch)
openlibrary/coverstore/tests/test_code.py:41
Functiontest_get_user_experiments
()
openlibrary/tests/core/test_experiments.py:46
Functiontest_get_user_experiments_audience
()
openlibrary/tests/core/test_experiments.py:128
Functiontest_get_user_experiments_overrides
()
openlibrary/tests/core/test_experiments.py:59
Methodtest_get_user_key_handles_at_prefix
Test parsing userid with '@' prefix (requires account lookup).
openlibrary/tests/core/test_waitinglist.py:280
Methodtest_get_user_key_parses_ol_prefix
Test parsing userid with 'ol:' prefix.
openlibrary/tests/core/test_waitinglist.py:275
Methodtest_get_user_key_returns_user_key_when_present
Test that user_key is returned directly when already set.
openlibrary/tests/core/test_waitinglist.py:270
Functiontest_get_variant_distribution
()
openlibrary/tests/core/test_experiments.py:23
Functiontest_get_variant_fallback
()
openlibrary/tests/core/test_experiments.py:14
Methodtest_get_waitinglist_size
Test getting the total waiting list size.
openlibrary/tests/core/test_waitinglist.py:247
Functiontest_get_wikidata_entity
( bust_cache: bool, fetch_missing: bool, status: str, expected_web_call: bool, expected_ca
openlibrary/tests/core/test_wikidata.py:52
Functiontest_get_wikipedia_link
()
openlibrary/tests/core/test_wikidata.py:82
Methodtest_get_window
(self, monkeypatch)
openlibrary/utils/tests/test_processors.py:22
Methodtest_get_with_provider_and_identifier
(self)
openlibrary/tests/fastapi/test_importapi.py:168
Methodtest_get_work_bookshelves_returns_summary
(self, fastapi_client)
openlibrary/tests/fastapi/test_work_bookshelves.py:46
Methodtest_getting_specific_version
(self)
scripts/tests/test_copydocs.py:90
Methodtest_goog_deprioritized
(self)
openlibrary/tests/solr/updater/test_work.py:504
Methodtest_handles_availability_none
(self, monkeypatch)
openlibrary/tests/core/test_lending.py:27
Methodtest_handles_ocaid_none
(self)
openlibrary/tests/core/test_lending.py:23
Methodtest_has_autoescape_enabled
Should have autoescaping enabled.
openlibrary/tests/core/test_jinja.py:133
Methodtest_has_gettext_global
Should have the _ (gettext) function in globals.
openlibrary/tests/core/test_jinja.py:127
Methodtest_has_lstrip_blocks_enabled
Should have lstrip_blocks enabled.
openlibrary/tests/core/test_jinja.py:143
Methodtest_has_strict_undefined
Should use StrictUndefined so undefined variables raise errors.
openlibrary/tests/core/test_jinja.py:117
Methodtest_has_trim_blocks_enabled
Should have trim_blocks enabled.
openlibrary/tests/core/test_jinja.py:138
Functiontest_health_endpoint
Test that the health endpoint returns 200 OK.
tests/integration/test_fastapi_auth.py:61
Methodtest_hex_entity_unescaped
Hex-form entities (Л) are also unescaped.
openlibrary/catalog/add_book/tests/test_add_book.py:1996
Methodtest_hidden_hosts_are_written_to_hide_ip_map
Add unique and duplicate IPs. Only the unique IPs should be echoed back to STDOUT; duplicated IPs are already in the DB.
scripts/tests/test_obfi.py:156
Methodtest_hide
(self, get_patched_hide)
scripts/tests/test_obfi.py:71
Methodtest_high_priority_true_passed_to_dynlinks
high_priority=true is passed to dynlinks.
openlibrary/tests/fastapi/test_books.py:283
Methodtest_hmac_failure
(self, fastapi_client)
openlibrary/tests/fastapi/test_account.py:146
Methodtest_home_template
(self, render_template, mock_site, monkeypatch)
openlibrary/plugins/openlibrary/tests/test_home.py:79
Methodtest_hook
When a document is saved, cookie must be set with its timestamp.
openlibrary/tests/core/test_processors_invalidation.py:31
Methodtest_hours_in_response
(self, fastapi_client, mock_get_trending_books, hours_param, expected_hours)
openlibrary/tests/fastapi/test_trending.py:102
Methodtest_html_comment_not_flagged
(self)
scripts/tests/test_detect_missing_i18n.py:37
Functiontest_html_format
(locale: str, msgid: str, msgstr: str)
openlibrary/i18n/test_po_files.py:78
Functiontest_html_line_marc8
()
openlibrary/catalog/marc/tests/test_marc_html.py:8
Methodtest_ia_boxid
(self)
openlibrary/tests/solr/updater/test_work.py:175
Functiontest_id_to_item_and_batch_id
()
openlibrary/coverstore/tests/test_archive.py:24
Methodtest_identifiers
(self)
openlibrary/tests/solr/updater/test_work.py:164
Methodtest_identifiers
(self)
openlibrary/tests/solr/updater/test_edition.py:45
Methodtest_ignores_docs_missing_an_author_key
(self)
openlibrary/plugins/worksearch/tests/test_author_suggestion.py:102
Methodtest_ignores_list_with_no_entities
Lists containing no HTML entities produce no updates.
scripts/tests/test_fix_unicode_html_entities.py:90
Methodtest_ignores_non_features_keys
(self, tmp_path: Path)
openlibrary/tests/core/test_features.py:89
Methodtest_ignores_short_shared_tokens_like_particles_initials
(self)
openlibrary/plugins/worksearch/tests/test_author_suggestion.py:46
Methodtest_ilike_compatibility
(self, mock_site)
openlibrary/mocks/tests/test_mock_infobase.py:104
Functiontest_image_path
(image_dir)
openlibrary/coverstore/tests/test_coverstore.py:137
Functiontest_import_author_name_natural_order
(author, new_import)
openlibrary/catalog/add_book/tests/test_load_book.py:47
Functiontest_import_author_name_unchanged
(author, new_import)
openlibrary/catalog/add_book/tests/test_load_book.py:54
Functiontest_import_edition_builder_JSON
(data)
openlibrary/plugins/importapi/tests/test_import_edition_builder.py:84
Methodtest_in_borrowable_collection_cuz_not_in_private_collection
(self)
openlibrary/tests/core/test_models.py:139
Methodtest_incorrect_length_marcs
If a Binary MARC has a different length than stated in the MARC leader, it is probably due to bad character conversions.
openlibrary/tests/catalog/test_get_ia.py:109
Functiontest_independently_published
(publishers, expected)
openlibrary/tests/catalog/test_utils.py:302
Methodtest_inline_skip_directive
(self)
scripts/tests/test_detect_missing_i18n.py:77
Methodtest_inline_skip_with_dollar_prefix
(self)
scripts/tests/test_detect_missing_i18n.py:98
Methodtest_internal_error
(self, fastapi_client)
openlibrary/tests/fastapi/test_account.py:192
Methodtest_internationalized_content
(self)
scripts/tests/test_detect_missing_i18n.py:17
Methodtest_invalid_bookshelf_response_matches_legacy
(self, fastapi_client, mock_authenticated_user, mock_bookshelves_model)
openlibrary/tests/fastapi/test_work_bookshelves.py:185
Methodtest_invalid_callback_names_rejected
Invalid JavaScript identifier callbacks should be rejected.
openlibrary/tests/fastapi/test_models.py:45
Functiontest_invalid_created_returns_d90_plus
()
openlibrary/plugins/openlibrary/tests/test_patron_status.py:38
Methodtest_invalid_edition_id_returns_422
Invalid edition_id format (not OL{number}M) returns 422 validation error.
openlibrary/tests/fastapi/test_booknotes.py:81
Methodtest_invalid_filename_does_not_call_upstream
Upstream must not be called for disallowed filenames.
openlibrary/tests/fastapi/test_cdn.py:55
Methodtest_invalid_format_raises_error
Test invalid format raises ValueError.
openlibrary/plugins/openlibrary/tests/test_partials.py:35
Functiontest_invalid_lccs
(text)
openlibrary/utils/tests/test_lcc.py:61
Methodtest_invalid_list_id_format
Invalid list_id format returns 422.
openlibrary/tests/fastapi/test_lists_delete.py:119
Methodtest_invalid_or_missing_bookshelf_returns_error
(self, fastapi_client, mock_authenticated_user, mock_bookshelves_model, data)
openlibrary/tests/fastapi/test_work_bookshelves.py:132
Methodtest_invalid_session_cookie_returns_403
(self, monkeypatch)
openlibrary/plugins/openlibrary/tests/test_verification.py:124
Methodtest_invalid_solr_request
(self, monkeypatch, monkeytime)
openlibrary/tests/solr/test_utils.py:118
Methodtest_invalid_subject_facet_includes_value_in_error
(self)
openlibrary/plugins/worksearch/tests/test_subjects.py:13
Methodtest_invalid_token_redirects_to_create_when_not_logged_in
(self, mock_web, mock_flash, mock_ia_account, mock_accounts)
openlibrary/plugins/upstream/tests/test_account.py:244
Methodtest_invalid_token_redirects_to_my_books_when_logged_in
(self, mock_web, mock_flash, mock_ia_account, mock_accounts)
openlibrary/plugins/upstream/tests/test_account.py:262
Methodtest_invalid_type
(self)
openlibrary/tests/solr/updater/test_work.py:442
Methodtest_invalid_vf_cookie_on_verify_human_passes_through
(self, monkeypatch)
openlibrary/plugins/openlibrary/tests/test_verification.py:81
Methodtest_invalid_vf_cookie_returns_403
(self, monkeypatch)
openlibrary/plugins/openlibrary/tests/test_verification.py:65
Methodtest_invalid_work_id_returns_422
Invalid work_id (negative) returns 422 validation error.
openlibrary/tests/fastapi/test_booknotes.py:89
Functiontest_is_allowed_cover_url_allowed
(url)
openlibrary/coverstore/tests/test_coverstore.py:168
Functiontest_is_allowed_cover_url_rejected
(url)
openlibrary/coverstore/tests/test_coverstore.py:197
Functiontest_is_asin_only
(rec, expected)
openlibrary/tests/catalog/test_utils.py:367
Methodtest_is_cached
Should return the same object on repeated calls (functools.cache).
openlibrary/tests/core/test_jinja.py:111
Functiontest_is_dvd
(physical_format, product_group, expected)
openlibrary/tests/core/test_vendors.py:496
Methodtest_is_empty_safe
(self)
openlibrary/plugins/worksearch/tests/test_author_suggestion.py:52
Methodtest_is_empty_safe
(self)
openlibrary/plugins/worksearch/tests/test_author_suggestion.py:106
Functiontest_is_exclusion_author_excluded
An author whose key is in author_exclusions returns True.
openlibrary/tests/core/test_processors.py:147
Functiontest_is_exclusion_author_not_excluded
An author not in author_exclusions returns False.
openlibrary/tests/core/test_processors.py:156
Functiontest_is_exclusion_empty_config_returns_false
When author_exclusions is absent from config, nothing is excluded.
openlibrary/tests/core/test_processors.py:165
Functiontest_is_exclusion_none_returns_false
is_exclusion(None) returns False without raising.
openlibrary/tests/core/test_processors.py:174
Methodtest_is_expired_when_status_available_and_expiry_past
Test that a loan is expired when status is available and expiry has passed.
openlibrary/tests/core/test_waitinglist.py:96
Methodtest_is_in_private_collection
(self)
openlibrary/tests/core/test_models.py:143
Methodtest_is_librarian_or_higher
(self, monkeypatch)
openlibrary/tests/core/test_models.py:63
Functiontest_is_low_quality_book
()
scripts/tests/test_partner_batch_imports.py:75
← previousnext →5,301–5,400 of 6,179, ranked by callers