MCPcopy Create free account

hub / github.com/internetarchive/openlibrary / functions

Functions6,179 in github.com/internetarchive/openlibrary

Functiontest_read_conversion_to_marc8
()
openlibrary/catalog/marc/tests/test_mnemonics.py:4
Methodtest_read_fields_returns_all
(self)
openlibrary/catalog/marc/tests/test_marc_binary.py:45
Functiontest_read_isbn
()
openlibrary/catalog/marc/tests/test_marc.py:53
Functiontest_read_no_change
()
openlibrary/catalog/marc/tests/test_mnemonics.py:10
Functiontest_read_pagination
()
openlibrary/catalog/marc/tests/test_marc.py:76
Functiontest_read_title
()
openlibrary/catalog/marc/tests/test_marc.py:163
Methodtest_reads_ocaids
(self, monkeypatch)
openlibrary/tests/core/test_lending.py:11
Methodtest_real_config_has_stats
(self)
openlibrary/tests/core/test_features.py:141
Methodtest_real_config_loads_without_error
(self)
openlibrary/tests/core/test_features.py:137
Methodtest_real_world_complex_case
(self)
openlibrary/tests/fastapi/test_models.py:140
Methodtest_record_must_have_valid_author
Only authors of the shape [{"name": "Williard Van Orman Quine"}] will validate.
openlibrary/plugins/importapi/tests/test_import_validator.py:220
Functiontest_records_with_substantively_bad_authors_should_not_validate
Certain author names are known to be bad and should be removed prior to validation. If all author names are removed the record will not valid
openlibrary/plugins/importapi/tests/test_import_validator.py:300
Functiontest_records_with_substantively_bad_dates_should_not_validate
Certain publish_dates are known to be suspect, so remove them prior to attempting validation. If a date is removed, the record will fail to v
openlibrary/plugins/importapi/tests/test_import_validator.py:270
Methodtest_redeem_invalid_keys_rejected
(self, mock_web, mock_ia)
openlibrary/plugins/upstream/tests/test_account.py:430
Methodtest_redeem_missing_auth_header
(self, mock_web, mock_ia)
openlibrary/plugins/upstream/tests/test_account.py:421
Methodtest_redeem_valid_keys_proceeds
(self, mock_web, mock_ia, mock_otp)
openlibrary/plugins/upstream/tests/test_account.py:440
Methodtest_redirect_preserves_redir_url
(self, fastapi_client)
openlibrary/tests/fastapi/test_follows.py:52
Methodtest_redirection
(self)
openlibrary/plugins/upstream/tests/test_merge_authors.py:231
Methodtest_redirects
(self)
openlibrary/tests/solr/test_update.py:139
Methodtest_reflects_yaml_reload
(self, tmp_path: Path)
openlibrary/tests/core/test_features.py:179
Functiontest_reformat_html
()
openlibrary/plugins/upstream/tests/test_utils.py:152
Functiontest_reimport_updates_edition_and_work_description
(mock_site)
openlibrary/catalog/add_book/tests/test_add_book.py:1598
Methodtest_rejects_invalid_pagination
(self, fastapi_client, patched_site)
openlibrary/tests/fastapi/test_work_editions_author_works.py:83
Methodtest_rejects_invalid_pagination
(self, fastapi_client, patched_site)
openlibrary/tests/fastapi/test_work_editions_author_works.py:219
Methodtest_rejects_negative_offset
(self, fastapi_client, patched_site)
openlibrary/tests/fastapi/test_work_editions_author_works.py:105
Methodtest_rejects_negative_offset
(self, fastapi_client, patched_site)
openlibrary/tests/fastapi/test_work_editions_author_works.py:227
Functiontest_related_subjects
()
openlibrary/plugins/upstream/tests/test_related_carousels.py:4
Methodtest_reload
If reload is called and there are some modifications, each hook should get called.
openlibrary/tests/core/test_processors_invalidation.py:47
Methodtest_reload_on_cookie
(self, monkeypatch)
openlibrary/tests/core/test_processors_invalidation.py:110
Methodtest_reload_on_timeout
(self, monkeypatch)
openlibrary/tests/core/test_processors_invalidation.py:68
Functiontest_relogin_after_logout
Test that we can login again after logging out.
tests/integration/test_fastapi_auth.py:90
Methodtest_remote_ids_merge_wikidata_from_duplicate
Test that Wikidata ID from duplicate author is merged into master. This reproduces the bug where remote_ids.wikidata was lost during merge.
openlibrary/plugins/upstream/tests/test_merge_authors.py:311
Methodtest_remove_note
Remove a note: returns 200 and calls Booknotes.remove with correct args.
openlibrary/tests/fastapi/test_booknotes.py:70
Methodtest_remove_response_matches_legacy
(self, fastapi_client, mock_authenticated_user, mock_bookshelves_model)
openlibrary/tests/fastapi/test_work_bookshelves.py:173
Functiontest_remove_trailing_dot
()
openlibrary/tests/catalog/test_utils.py:191
Functiontest_remove_trailing_number_dot
(date: str, expected: str)
openlibrary/tests/catalog/test_utils.py:421
Functiontest_render_cached_macro_evicts_cache_on_error
When a rendered macro returns `do_not_cache='True'` (e.g. because `work_search` returned a Solr error in RawQueryCarousel), the bad result
openlibrary/plugins/upstream/tests/test_utils.py:342
Functiontest_require_authenticated_user_returns_401_with_no_cookie
require_authenticated_user must raise HTTP 401 when the cookie is absent.
openlibrary/tests/fastapi/test_auth.py:94
Functiontest_require_librarian_allows_admin
require_librarian allows access for admin users.
openlibrary/tests/fastapi/test_auth.py:158
Functiontest_require_librarian_allows_librarian
require_librarian allows access for librarian users.
openlibrary/tests/fastapi/test_auth.py:176
Functiontest_require_librarian_allows_super_librarian
require_librarian allows access for super-librarian users.
openlibrary/tests/fastapi/test_auth.py:194
Functiontest_require_librarian_returns_401_with_no_cookie
require_librarian must raise HTTP 401 when the user is not authenticated.
openlibrary/tests/fastapi/test_auth.py:131
Functiontest_require_librarian_returns_403_for_regular_user
require_librarian must raise HTTP 403 when the user lacks librarian-level roles.
openlibrary/tests/fastapi/test_auth.py:140
Functiontest_require_librarian_returns_403_when_user_is_none
require_librarian returns 403 when get_current_user returns None.
openlibrary/tests/fastapi/test_auth.py:212
Methodtest_requires_all_fields
(self)
openlibrary/tests/core/test_features.py:42
Functiontest_resize_image_aspect_ratio
make sure the aspect-ratio is maintained
openlibrary/coverstore/tests/test_coverstore.py:56
Methodtest_resolve_redirect_chain
(self, monkeypatch)
openlibrary/tests/core/test_models.py:228
Methodtest_response_includes_metadata
Test that the response includes expected metadata fields.
openlibrary/tests/fastapi/test_search.py:170
Methodtest_response_matches_legacy
(self, fastapi_client, patched_site)
openlibrary/tests/fastapi/test_work_editions_author_works.py:136
Methodtest_response_matches_legacy
(self, fastapi_client, patched_site)
openlibrary/tests/fastapi/test_work_editions_author_works.py:258
Methodtest_retry
(self, monkeytime)
openlibrary/utils/tests/test_retry.py:22
Methodtest_returns_404_for_missing_or_wrong_type
(self, fastapi_client, doc_key, patched_site)
openlibrary/tests/fastapi/test_work_editions_author_works.py:114
Methodtest_returns_404_for_missing_or_wrong_type
(self, fastapi_client, doc_key, patched_site)
openlibrary/tests/fastapi/test_work_editions_author_works.py:236
Methodtest_returns_correct_avatar_url
(self)
openlibrary/plugins/upstream/tests/test_models.py:110
Methodtest_returns_following_list
(self, fastapi_client, mock_optional_authenticated_user)
openlibrary/tests/fastapi/test_follows.py:18
Methodtest_returns_jinja2_environment
Should return a Jinja2 Environment instance.
openlibrary/tests/core/test_jinja.py:106
Methodtest_returns_nothing_for_a_title_search
(self)
openlibrary/plugins/worksearch/tests/test_author_suggestion.py:98
Methodtest_reveal_no_replace
(self, monkeypatch, capsys)
scripts/tests/test_obfi.py:107
Methodtest_reveal_with_replace
(self, monkeypatch, capsys)
scripts/tests/test_obfi.py:116
Methodtest_reverts_spam_edits
(self, mock_site)
openlibrary/plugins/admin/tests/test_code.py:89
Functiontest_route
(user: Annotated[AuthenticatedUser | None, Depends(get_authenticated_user)])
openlibrary/tests/fastapi/test_auth.py:85
Methodtest_routes_state_to_subscribe_or_unsubscribe
( self, fastapi_client, mock_optional_authenticated_user, state, expec
openlibrary/tests/fastapi/test_follows.py:68
Methodtest_s3_auth_failure
(self, fastapi_client)
openlibrary/tests/fastapi/test_account.py:182
Functiontest_safesort
()
openlibrary/tests/core/test_helpers.py:53
Functiontest_same_twice
(mock_site, add_languages)
openlibrary/catalog/add_book/tests/test_add_book.py:992
Methodtest_sample_csv_row
(self)
scripts/tests/test_partner_batch_imports.py:25
Methodtest_sample_csv_row_with_full_date
Only import the year. The date in the input here is in YYYYMMDD format, but should come out YYYY.
scripts/tests/test_partner_batch_imports.py:45
Functiontest_sanitize
()
openlibrary/tests/core/test_helpers.py:27
Functiontest_save_page_now_integration
(url)
scripts/tests/test_archive.py:33
Methodtest_search_parameter_types
Test that specific parameters are passed down with the correct types.
openlibrary/tests/fastapi/test_search.py:214
Methodtest_search_uses_query_param
Test that the search endpoint uses the 'q' query parameter.
openlibrary/tests/fastapi/test_search.py:39
Methodtest_second_match_remote_identifier
Next highest priority match is any other remote identifier, such as VIAF, Goodreads ID, Amazon ID, etc.
openlibrary/catalog/add_book/tests/test_load_book.py:199
Methodtest_seed_changes_when_yday_changes
Ensure the seed changes each day.
scripts/tests/test_obfi.py:137
Functiontest_seed_from_json_with_blank_key
Test that Seed.from_json rejects blank keys. Attempting to create a Seed with a blank key should raise a ValueError.
openlibrary/tests/core/test_lists_model.py:26
Functiontest_seed_from_json_with_valid_key
Test that Seed.from_json works correctly with valid keys.
openlibrary/tests/core/test_lists_model.py:39
Methodtest_seed_to_key
(self)
openlibrary/olbase/tests/test_events.py:5
Functiontest_seed_with_nonstring
()
openlibrary/tests/core/test_lists_model.py:17
Functiontest_seed_with_string
()
openlibrary/tests/core/test_lists_model.py:8
Methodtest_select_all_by_username
(self)
openlibrary/tests/core/test_db.py:394
Methodtest_select_by_username_and_year
(self)
openlibrary/tests/core/test_db.py:473
Functiontest_serialize_does_not_load_translators_as_authors
Ensure data load does not load translators as author and relies on fake API response objects
openlibrary/tests/core/test_vendors.py:411
Functiontest_serialize_pages_0
()
openlibrary/tests/core/test_vendors.py:404
Functiontest_serialize_sample_record
()
openlibrary/tests/core/test_vendors.py:382
Functiontest_series_autocomplete_olid
()
openlibrary/plugins/worksearch/tests/test_autocomplete.py:108
Functiontest_series_autocomplete_url
()
openlibrary/plugins/worksearch/tests/test_autocomplete.py:124
Methodtest_series_sorting
(self, monkeypatch)
openlibrary/tests/core/lists/test_model.py:55
Functiontest_serve_file
(image_dir)
openlibrary/coverstore/tests/test_coverstore.py:75
Functiontest_server_image
(image_dir)
openlibrary/coverstore/tests/test_coverstore.py:86
Functiontest_session_cookie_auto_error_is_false
auto_error must be False so that missing cookies yield None instead of raising 422, allowing optional authentication on mixed endpoints.
openlibrary/tests/fastapi/test_auth.py:28
Functiontest_session_cookie_is_apikeycookie
session_cookie must be an APIKeyCookie instance so FastAPI registers it as an OpenAPI security scheme (the core requirement of issue #12683).
openlibrary/tests/fastapi/test_auth.py:22
Methodtest_set
(self)
openlibrary/mocks/tests/test_mock_memcache.py:7
Functiontest_set_share_links
()
openlibrary/plugins/upstream/tests/test_utils.py:49
Functiontest_set_share_links_unicode
()
openlibrary/plugins/upstream/tests/test_utils.py:72
Methodtest_setcookie_after_reload
(self, monkeypatch)
openlibrary/tests/core/test_processors_invalidation.py:136
Methodtest_setup
(self)
openlibrary/plugins/upstream/tests/test_models.py:22
Methodtest_shared_constants
(self)
tests/test_docker_compose.py:38
Methodtest_show_all_items_passed
Verify show_all_items query param is forwarded in options.
openlibrary/tests/fastapi/test_books.py:352
Methodtest_shownames
When an IP resolves, stick it in [brackets] next to the IP. This tests both an IP that resolves and one that doesn't.
scripts/tests/test_obfi.py:188
Methodtest_signatures
(self)
openlibrary/tests/core/test_cache.py:106
Methodtest_simple_average
Test basic average calculation.
openlibrary/tests/core/test_ratings.py:78
← previousnext →5,801–5,900 of 6,179, ranked by callers