Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/internetarchive/openlibrary
/ functions
Functions
6,179 in github.com/internetarchive/openlibrary
⨍
Functions
6,179
◇
Types & classes
1,059
↳
Endpoints
131
Function
test_read_conversion_to_marc8
()
openlibrary/catalog/marc/tests/test_mnemonics.py:4
Method
test_read_fields_returns_all
(self)
openlibrary/catalog/marc/tests/test_marc_binary.py:45
Function
test_read_isbn
()
openlibrary/catalog/marc/tests/test_marc.py:53
Function
test_read_no_change
()
openlibrary/catalog/marc/tests/test_mnemonics.py:10
Function
test_read_pagination
()
openlibrary/catalog/marc/tests/test_marc.py:76
Function
test_read_title
()
openlibrary/catalog/marc/tests/test_marc.py:163
Method
test_reads_ocaids
(self, monkeypatch)
openlibrary/tests/core/test_lending.py:11
Method
test_real_config_has_stats
(self)
openlibrary/tests/core/test_features.py:141
Method
test_real_config_loads_without_error
(self)
openlibrary/tests/core/test_features.py:137
Method
test_real_world_complex_case
(self)
openlibrary/tests/fastapi/test_models.py:140
Method
test_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
Function
test_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
Function
test_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
Method
test_redeem_invalid_keys_rejected
(self, mock_web, mock_ia)
openlibrary/plugins/upstream/tests/test_account.py:430
Method
test_redeem_missing_auth_header
(self, mock_web, mock_ia)
openlibrary/plugins/upstream/tests/test_account.py:421
Method
test_redeem_valid_keys_proceeds
(self, mock_web, mock_ia, mock_otp)
openlibrary/plugins/upstream/tests/test_account.py:440
Method
test_redirect_preserves_redir_url
(self, fastapi_client)
openlibrary/tests/fastapi/test_follows.py:52
Method
test_redirection
(self)
openlibrary/plugins/upstream/tests/test_merge_authors.py:231
Method
test_redirects
(self)
openlibrary/tests/solr/test_update.py:139
Method
test_reflects_yaml_reload
(self, tmp_path: Path)
openlibrary/tests/core/test_features.py:179
Function
test_reformat_html
()
openlibrary/plugins/upstream/tests/test_utils.py:152
Function
test_reimport_updates_edition_and_work_description
(mock_site)
openlibrary/catalog/add_book/tests/test_add_book.py:1598
Method
test_rejects_invalid_pagination
(self, fastapi_client, patched_site)
openlibrary/tests/fastapi/test_work_editions_author_works.py:83
Method
test_rejects_invalid_pagination
(self, fastapi_client, patched_site)
openlibrary/tests/fastapi/test_work_editions_author_works.py:219
Method
test_rejects_negative_offset
(self, fastapi_client, patched_site)
openlibrary/tests/fastapi/test_work_editions_author_works.py:105
Method
test_rejects_negative_offset
(self, fastapi_client, patched_site)
openlibrary/tests/fastapi/test_work_editions_author_works.py:227
Function
test_related_subjects
()
openlibrary/plugins/upstream/tests/test_related_carousels.py:4
Method
test_reload
If reload is called and there are some modifications, each hook should get called.
openlibrary/tests/core/test_processors_invalidation.py:47
Method
test_reload_on_cookie
(self, monkeypatch)
openlibrary/tests/core/test_processors_invalidation.py:110
Method
test_reload_on_timeout
(self, monkeypatch)
openlibrary/tests/core/test_processors_invalidation.py:68
Function
test_relogin_after_logout
Test that we can login again after logging out.
tests/integration/test_fastapi_auth.py:90
Method
test_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
Method
test_remove_note
Remove a note: returns 200 and calls Booknotes.remove with correct args.
openlibrary/tests/fastapi/test_booknotes.py:70
Method
test_remove_response_matches_legacy
(self, fastapi_client, mock_authenticated_user, mock_bookshelves_model)
openlibrary/tests/fastapi/test_work_bookshelves.py:173
Function
test_remove_trailing_dot
()
openlibrary/tests/catalog/test_utils.py:191
Function
test_remove_trailing_number_dot
(date: str, expected: str)
openlibrary/tests/catalog/test_utils.py:421
Function
test_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
Function
test_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
Function
test_require_librarian_allows_admin
require_librarian allows access for admin users.
openlibrary/tests/fastapi/test_auth.py:158
Function
test_require_librarian_allows_librarian
require_librarian allows access for librarian users.
openlibrary/tests/fastapi/test_auth.py:176
Function
test_require_librarian_allows_super_librarian
require_librarian allows access for super-librarian users.
openlibrary/tests/fastapi/test_auth.py:194
Function
test_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
Function
test_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
Function
test_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
Method
test_requires_all_fields
(self)
openlibrary/tests/core/test_features.py:42
Function
test_resize_image_aspect_ratio
make sure the aspect-ratio is maintained
openlibrary/coverstore/tests/test_coverstore.py:56
Method
test_resolve_redirect_chain
(self, monkeypatch)
openlibrary/tests/core/test_models.py:228
Method
test_response_includes_metadata
Test that the response includes expected metadata fields.
openlibrary/tests/fastapi/test_search.py:170
Method
test_response_matches_legacy
(self, fastapi_client, patched_site)
openlibrary/tests/fastapi/test_work_editions_author_works.py:136
Method
test_response_matches_legacy
(self, fastapi_client, patched_site)
openlibrary/tests/fastapi/test_work_editions_author_works.py:258
Method
test_retry
(self, monkeytime)
openlibrary/utils/tests/test_retry.py:22
Method
test_returns_404_for_missing_or_wrong_type
(self, fastapi_client, doc_key, patched_site)
openlibrary/tests/fastapi/test_work_editions_author_works.py:114
Method
test_returns_404_for_missing_or_wrong_type
(self, fastapi_client, doc_key, patched_site)
openlibrary/tests/fastapi/test_work_editions_author_works.py:236
Method
test_returns_correct_avatar_url
(self)
openlibrary/plugins/upstream/tests/test_models.py:110
Method
test_returns_following_list
(self, fastapi_client, mock_optional_authenticated_user)
openlibrary/tests/fastapi/test_follows.py:18
Method
test_returns_jinja2_environment
Should return a Jinja2 Environment instance.
openlibrary/tests/core/test_jinja.py:106
Method
test_returns_nothing_for_a_title_search
(self)
openlibrary/plugins/worksearch/tests/test_author_suggestion.py:98
Method
test_reveal_no_replace
(self, monkeypatch, capsys)
scripts/tests/test_obfi.py:107
Method
test_reveal_with_replace
(self, monkeypatch, capsys)
scripts/tests/test_obfi.py:116
Method
test_reverts_spam_edits
(self, mock_site)
openlibrary/plugins/admin/tests/test_code.py:89
Function
test_route
(user: Annotated[AuthenticatedUser | None, Depends(get_authenticated_user)])
openlibrary/tests/fastapi/test_auth.py:85
Method
test_routes_state_to_subscribe_or_unsubscribe
( self, fastapi_client, mock_optional_authenticated_user, state, expec
openlibrary/tests/fastapi/test_follows.py:68
Method
test_s3_auth_failure
(self, fastapi_client)
openlibrary/tests/fastapi/test_account.py:182
Function
test_safesort
()
openlibrary/tests/core/test_helpers.py:53
Function
test_same_twice
(mock_site, add_languages)
openlibrary/catalog/add_book/tests/test_add_book.py:992
Method
test_sample_csv_row
(self)
scripts/tests/test_partner_batch_imports.py:25
Method
test_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
Function
test_sanitize
()
openlibrary/tests/core/test_helpers.py:27
Function
test_save_page_now_integration
(url)
scripts/tests/test_archive.py:33
Method
test_search_parameter_types
Test that specific parameters are passed down with the correct types.
openlibrary/tests/fastapi/test_search.py:214
Method
test_search_uses_query_param
Test that the search endpoint uses the 'q' query parameter.
openlibrary/tests/fastapi/test_search.py:39
Method
test_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
Method
test_seed_changes_when_yday_changes
Ensure the seed changes each day.
scripts/tests/test_obfi.py:137
Function
test_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
Function
test_seed_from_json_with_valid_key
Test that Seed.from_json works correctly with valid keys.
openlibrary/tests/core/test_lists_model.py:39
Method
test_seed_to_key
(self)
openlibrary/olbase/tests/test_events.py:5
Function
test_seed_with_nonstring
()
openlibrary/tests/core/test_lists_model.py:17
Function
test_seed_with_string
()
openlibrary/tests/core/test_lists_model.py:8
Method
test_select_all_by_username
(self)
openlibrary/tests/core/test_db.py:394
Method
test_select_by_username_and_year
(self)
openlibrary/tests/core/test_db.py:473
Function
test_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
Function
test_serialize_pages_0
()
openlibrary/tests/core/test_vendors.py:404
Function
test_serialize_sample_record
()
openlibrary/tests/core/test_vendors.py:382
Function
test_series_autocomplete_olid
()
openlibrary/plugins/worksearch/tests/test_autocomplete.py:108
Function
test_series_autocomplete_url
()
openlibrary/plugins/worksearch/tests/test_autocomplete.py:124
Method
test_series_sorting
(self, monkeypatch)
openlibrary/tests/core/lists/test_model.py:55
Function
test_serve_file
(image_dir)
openlibrary/coverstore/tests/test_coverstore.py:75
Function
test_server_image
(image_dir)
openlibrary/coverstore/tests/test_coverstore.py:86
Function
test_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
Function
test_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
Method
test_set
(self)
openlibrary/mocks/tests/test_mock_memcache.py:7
Function
test_set_share_links
()
openlibrary/plugins/upstream/tests/test_utils.py:49
Function
test_set_share_links_unicode
()
openlibrary/plugins/upstream/tests/test_utils.py:72
Method
test_setcookie_after_reload
(self, monkeypatch)
openlibrary/tests/core/test_processors_invalidation.py:136
Method
test_setup
(self)
openlibrary/plugins/upstream/tests/test_models.py:22
Method
test_shared_constants
(self)
tests/test_docker_compose.py:38
Method
test_show_all_items_passed
Verify show_all_items query param is forwarded in options.
openlibrary/tests/fastapi/test_books.py:352
Method
test_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
Method
test_signatures
(self)
openlibrary/tests/core/test_cache.py:106
Method
test_simple_average
Test basic average calculation.
openlibrary/tests/core/test_ratings.py:78
← previous
next →
5,801–5,900 of 6,179, ranked by callers