MCPcopy Create free account

hub / github.com/internetarchive/openlibrary / functions

Functions6,179 in github.com/internetarchive/openlibrary

Methodtest_person_key_format
Test person_key: format conversion.
openlibrary/plugins/openlibrary/tests/test_partials.py:15
Methodtest_pgdecode_ascii_printable
(self)
openlibrary/tests/data/test_dump.py:59
Methodtest_pgdecode_substitute
(self)
openlibrary/tests/data/test_dump.py:56
Methodtest_photos
(self)
openlibrary/plugins/upstream/tests/test_merge_authors.py:252
Functiontest_pick_best_author
()
openlibrary/tests/catalog/test_utils.py:117
Functiontest_pick_best_name
()
openlibrary/tests/catalog/test_utils.py:99
Functiontest_pick_first_date
()
openlibrary/tests/catalog/test_utils.py:89
Methodtest_place_key_format
Test place_key: format conversion.
openlibrary/plugins/openlibrary/tests/test_partials.py:19
Methodtest_plain_isbn
Plain ISBN without prefix.
openlibrary/tests/fastapi/test_books.py:98
Methodtest_plain_subject_name_uses_full_slug
decorate_with_tags normalizes a plain subject name and uses subject_type.
openlibrary/plugins/worksearch/tests/test_subjects.py:58
Methodtest_post_accepts_edition_olid_without_path_prefix
(self, fastapi_client, mock_authenticated_user, mock_bookshelves_model)
openlibrary/tests/fastapi/test_work_bookshelves.py:79
Methodtest_post_adds_work_to_bookshelf
(self, fastapi_client, mock_authenticated_user, mock_bookshelves_model)
openlibrary/tests/fastapi/test_work_bookshelves.py:63
Methodtest_post_award_adds_award
(self, fastapi_client, mock_authenticated_user, mock_bestbook_model)
openlibrary/tests/fastapi/test_bestbook.py:57
Methodtest_post_award_adds_award_from_query_params
(self, fastapi_client, mock_authenticated_user, mock_bestbook_model)
openlibrary/tests/fastapi/test_bestbook.py:82
Methodtest_post_award_defaults_to_add
(self, fastapi_client, mock_authenticated_user, mock_bestbook_model)
openlibrary/tests/fastapi/test_bestbook.py:107
Methodtest_post_award_form_values_override_query_values
(self, fastapi_client, mock_authenticated_user, mock_bestbook_model)
openlibrary/tests/fastapi/test_bestbook.py:124
Methodtest_post_award_rejects_invalid_op
(self, fastapi_client, mock_authenticated_user)
openlibrary/tests/fastapi/test_bestbook.py:249
Methodtest_post_award_rejects_invalid_query_op
(self, fastapi_client, mock_authenticated_user)
openlibrary/tests/fastapi/test_bestbook.py:260
Methodtest_post_award_rejects_invalid_work_id
(self, fastapi_client, mock_authenticated_user, path)
openlibrary/tests/fastapi/test_bestbook.py:272
Methodtest_post_award_removes_award
(self, fastapi_client, mock_authenticated_user, mock_bestbook_model)
openlibrary/tests/fastapi/test_bestbook.py:155
Methodtest_post_award_requires_authentication
(self, fastapi_client)
openlibrary/tests/fastapi/test_bestbook.py:238
Methodtest_post_award_returns_domain_errors
(self, fastapi_client, mock_authenticated_user, mock_bestbook_model)
openlibrary/tests/fastapi/test_bestbook.py:223
Methodtest_post_award_updates_award
(self, fastapi_client, mock_authenticated_user, mock_bestbook_model)
openlibrary/tests/fastapi/test_bestbook.py:169
Methodtest_post_award_updates_award_from_query_params
(self, fastapi_client, mock_authenticated_user, mock_bestbook_model)
openlibrary/tests/fastapi/test_bestbook.py:196
Methodtest_post_can_save
(self)
openlibrary/tests/fastapi/test_importapi.py:215
Functiontest_post_follows_nonexistent_publisher_returns_404
()
openlibrary/plugins/openlibrary/tests/test_followsapi.py:21
Functiontest_post_follows_valid_publisher_succeeds
()
openlibrary/plugins/openlibrary/tests/test_followsapi.py:39
Methodtest_post_forbidden_for_regular_user
(self, fastapi_client, mock_authenticated_user, mock_user_factory)
openlibrary/tests/fastapi/test_importapi.py:86
Methodtest_post_invalid_source_returns_error
(self)
openlibrary/tests/fastapi/test_importapi.py:253
Methodtest_post_passes_ids_correctly
(self, fastapi_client, mock_get_availability)
openlibrary/tests/fastapi/test_book_availability.py:33
Methodtest_post_ratings_adds_rating
(self, fastapi_client, mock_authenticated_user, mock_ratings_model)
openlibrary/tests/fastapi/test_ratings.py:63
Methodtest_post_ratings_invalid_rating_returns_422
(self, fastapi_client, mock_authenticated_user, invalid_rating)
openlibrary/tests/fastapi/test_ratings.py:95
Methodtest_post_ratings_removes_rating_when_rating_is_missing
(self, fastapi_client, mock_authenticated_user, mock_ratings_model)
openlibrary/tests/fastapi/test_ratings.py:80
Methodtest_post_ratings_requires_authentication
(self, fastapi_client)
openlibrary/tests/fastapi/test_ratings.py:89
Methodtest_post_rejects_invalid_work_id
(self, fastapi_client, mock_authenticated_user, path)
openlibrary/tests/fastapi/test_work_bookshelves.py:149
Methodtest_post_rejects_malformed_edition_id
(self, fastapi_client, mock_authenticated_user, edition_id)
openlibrary/tests/fastapi/test_work_bookshelves.py:155
Methodtest_post_removes_work_from_bookshelf
(self, fastapi_client, mock_authenticated_user, mock_bookshelves_model)
openlibrary/tests/fastapi/test_work_bookshelves.py:92
Methodtest_post_requires_authentication
(self, fastapi_client)
openlibrary/tests/fastapi/test_work_bookshelves.py:143
Methodtest_post_requires_authentication
(self, fastapi_client)
openlibrary/tests/fastapi/test_importapi.py:77
Methodtest_post_returns_import_result
(self, mock_import_request)
openlibrary/tests/fastapi/test_importapi.py:207
Methodtest_post_seeds_forbidden
Authenticated user without write access should receive 403.
openlibrary/tests/fastapi/test_list_seeds.py:98
Methodtest_post_seeds_list_not_found
POST to a non-existent list should return 404.
openlibrary/tests/fastapi/test_list_seeds.py:86
Methodtest_post_seeds_success
Authenticated user with write access can update seeds on any route.
openlibrary/tests/fastapi/test_list_seeds.py:63
Methodtest_post_seeds_unauthorized
Unauthenticated requests to mutate seeds should be rejected.
openlibrary/tests/fastapi/test_list_seeds.py:47
Methodtest_post_toggles_current_bookshelf_off
(self, fastapi_client, mock_authenticated_user, mock_bookshelves_model)
openlibrary/tests/fastapi/test_work_bookshelves.py:105
Methodtest_post_without_save_defaults_to_false
(self)
openlibrary/tests/fastapi/test_importapi.py:236
Functiontest_preisbn_import_does_not_match_existing_undated_isbn_record
(mock_site)
openlibrary/catalog/add_book/tests/test_add_book.py:1189
Functiontest_prepare_select
()
openlibrary/utils/tests/test_solr.py:4
Functiontest_prepare_solr_query_params_borrowable_editions_fq_anchors_negation
"Borrowable Only" maps to has_fulltext=true + public_scan=false, the latter rewriting to a negated `-ebook_access:public`. A bare pure-negative
openlibrary/plugins/worksearch/tests/test_worksearch.py:129
Functiontest_prepare_solr_query_params_first_publish_year_string
Test to check that when we have a facet value as a string it is converted to a list properly
openlibrary/plugins/worksearch/tests/test_worksearch.py:86
Functiontest_prepare_solr_query_params_language_mirrored_into_editions_fq
The language constraint must reach editions.fq so a work matches only when the *same edition* is in a selected language. Without this, "English"
openlibrary/plugins/worksearch/tests/test_worksearch.py:164
Functiontest_prepare_solr_query_params_multiple_languages_or_into_single_fq
Multiple selected languages are additive: a work in *any* of them should match, so they must be OR-ed into one fq. Emitting one fq per value AND-s
openlibrary/plugins/worksearch/tests/test_worksearch.py:150
Functiontest_prepare_solr_query_params_open_access_editions_fq_positive_unwrapped
A positive availability clause ("Free to read now" → public_scan=true → ebook_access:public) must pass through to editions.fq unwrapped — the
openlibrary/plugins/worksearch/tests/test_worksearch.py:141
Methodtest_prev_offset_never_negative
Prev offset should be 0, not negative, when offset < limit.
openlibrary/plugins/openlibrary/tests/test_lists.py:206
Methodtest_previous_line_skip_directive
(self)
scripts/tests/test_detect_missing_i18n.py:81
Functiontest_prioritized_identifier_equality_set_uniqueness
`PrioritizedIdentifier` is unique in a set when no other class instance in the set has the same identifier.
scripts/tests/test_affiliate_server.py:126
Functiontest_prioritized_identifier_serialize_to_json
`PrioritizedIdentifier` needs to be be serializable to JSON because it is sometimes called in, e.g. `json.dumps()`.
scripts/tests/test_affiliate_server.py:143
Methodtest_private_reading_log_returns_403
(self, fastapi_client, monkeypatch)
openlibrary/tests/fastapi/test_public_my_books.py:32
Methodtest_process_doc0
(self)
openlibrary/plugins/books/tests/test_dynlinks.py:467
Methodtest_process_doc9
(self, monkeypatch)
openlibrary/plugins/books/tests/test_dynlinks.py:472
Functiontest_process_doc_for_view_api
(monkeypatch)
openlibrary/plugins/books/tests/test_dynlinks.py:262
Functiontest_process_facet
()
openlibrary/plugins/worksearch/tests/test_worksearch.py:15
Functiontest_process_feed_advances_state_when_mapping_fails
Newer publication without ISBN must still bump max_modified — otherwise every future run re-scans the same record forever.
scripts/tests/test_bwb_opds_imports.py:270
Functiontest_process_feed_early_stops_on_first_all_stale_page
Once a whole page contains nothing newer than ``since``, stop walking.
scripts/tests/test_bwb_opds_imports.py:290
Functiontest_process_feed_excludes_low_quality
Reuse partner-import filters: independently-published 'notebook' from 2024 is dropped.
scripts/tests/test_bwb_opds_imports.py:348
Functiontest_process_feed_filters_by_modified
(monkeypatch)
scripts/tests/test_bwb_opds_imports.py:223
Functiontest_process_feed_full_traversal_is_the_default
(monkeypatch)
scripts/tests/test_bwb_opds_imports.py:322
Functiontest_process_feed_logs_and_skips_bad_modified
(monkeypatch, modified_raw)
scripts/tests/test_bwb_opds_imports.py:406
Functiontest_process_feed_skips_publication_without_modified
(monkeypatch)
scripts/tests/test_bwb_opds_imports.py:254
Methodtest_process_goodreads_csv_with_bytes
(self)
openlibrary/plugins/upstream/tests/test_account.py:175
Methodtest_process_goodreads_csv_with_utf8
(self)
openlibrary/plugins/upstream/tests/test_account.py:169
Functiontest_process_google_book
Test a few permutations to make sure the function can handle missing fields. It is assumed there will always be an ISBN 10 or 13 as that is
scripts/tests/test_affiliate_server.py:326
Functiontest_process_google_book_multiple_items
We should only get one result per ISBN.
scripts/tests/test_affiliate_server.py:342
Functiontest_process_google_book_no_items
Sometimes there will be no results from Google Books.
scripts/tests/test_affiliate_server.py:336
Functiontest_process_result_for_details
(monkeypatch)
openlibrary/plugins/books/tests/test_dynlinks.py:289
Functiontest_process_user_query
(query, parsed_query)
openlibrary/plugins/worksearch/schemes/tests/test_works.py:124
Functiontest_public_api_params
This test is to ensure that public_api_params doesn't get out of sync with what is in the endpoint. If this test is failing, then you probabl
openlibrary/tests/fastapi/test_search.py:318
Functiontest_publication_too_old_and_not_exempt
See publication_too_old_and_not_exempt() for an explanation of which sources require which publication years.
openlibrary/tests/catalog/test_utils.py:282
Functiontest_publication_year
(year, expected)
openlibrary/tests/catalog/test_utils.py:223
Methodtest_publish_year
(self)
openlibrary/tests/solr/updater/test_work.py:125
Functiontest_published_in_future_year
Test with last year, this year, and next year.
openlibrary/tests/catalog/test_utils.py:235
Methodtest_q_param_validation
Test that the 'q' parameter is optional, ≥3 chars when present, and not exactly 'the'.
openlibrary/tests/fastapi/test_search.py:273
Functiontest_q_to_solr_params_edition_key
(query, edQuery)
openlibrary/plugins/worksearch/schemes/tests/test_works.py:139
Functiontest_q_to_solr_params_includes_qf
()
openlibrary/plugins/worksearch/schemes/tests/test_lists.py:4
Functiontest_q_to_solr_params_seed_count_filter_added_by_default
()
openlibrary/plugins/worksearch/schemes/tests/test_lists.py:12
Functiontest_q_to_solr_params_seed_count_filter_skipped_when_queried
()
openlibrary/plugins/worksearch/schemes/tests/test_lists.py:19
Methodtest_query
(self, mock_site)
openlibrary/mocks/tests/test_mock_infobase.py:44
Functiontest_query_docs
(monkeypatch)
openlibrary/plugins/books/tests/test_dynlinks.py:254
Methodtest_query_exception
(self, httpx_mock, monkeypatch)
openlibrary/tests/core/test_fulltext.py:16
Functiontest_query_keys
(monkeypatch)
openlibrary/plugins/books/tests/test_dynlinks.py:247
Methodtest_query_param_invalid_json
Test that invalid JSON in the 'query' parameter returns an error. When the 'query' parameter contains malformed JSON, the endpoint should
openlibrary/tests/fastapi/test_search.py:118
Methodtest_query_param_parsing
Test that the 'query' JSON parameter is correctly parsed and passed to work_search_async. When the 'query' parameter is specified, it should
openlibrary/tests/fastapi/test_search.py:90
Methodtest_query_param_takes_precedence_over_individual_params
If both 'query=' and individual params are sent, 'query=' wins completely.
openlibrary/tests/fastapi/test_search.py:57
Methodtest_query_params_forwarded
(self, fastapi_client, mock_get_trending_books, query_string, expected_kwargs)
openlibrary/tests/fastapi/test_trending.py:79
Methodtest_raises_no_title
(self)
openlibrary/catalog/marc/tests/test_parse.py:152
Methodtest_raises_see_also
(self)
openlibrary/catalog/marc/tests/test_parse.py:146
Methodtest_random_string
(self)
openlibrary/tests/core/test_cache.py:28
Methodtest_range_position
(self)
openlibrary/tests/core/lists/test_model.py:105
Functiontest_rating
(config, monkeypatch)
openlibrary/plugins/openlibrary/tests/test_ratingsapi.py:43
Methodtest_read_author_person
(self)
openlibrary/catalog/marc/tests/test_parse.py:167
← previousnext →5,701–5,800 of 6,179, ranked by callers