Skip to content

Commit

Permalink
setup: bump inspire-schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
drjova committed Jun 10, 2024
1 parent 7aab90e commit 16354bf
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 22 deletions.
48 changes: 34 additions & 14 deletions backend/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions backend/tests/integration/search/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ def test_return_record_for_journal_info_search_with_journal_title_with_dots_and_
cited_record_json = {
"$schema": "http://localhost:5000/schemas/records/hep.json",
"_collections": ["Literature"],
"control_number": 1,
"document_type": ["article"],
"publication_info": [
{
Expand All @@ -118,9 +117,9 @@ def test_return_record_for_journal_info_search_with_journal_title_with_dots_and_
"jou",
data={"short_title": "Phys.Lett.B", "journal_title": {"title": "Phys Lett B"}},
)
create_record("lit", cited_record_json)
record = create_record("lit", cited_record_json)

expected_control_number = 1
expected_control_number = record["control_number"]

for query in queries:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
# inspirehep is free software; you can redistribute it and/or modify it under
# the terms of the MIT License; see LICENSE file for more details.


import mock
import pytest
from helpers.providers.faker import faker
from inspire_schemas.api import load_schema, validate
from isbnlib._exceptions import NotValidISBNError

from inspirehep.records.marshmallow.literature.bibtex import BibTexCommonSchema

Expand Down Expand Up @@ -296,12 +297,10 @@ def test_isbn_invalid():
"isbns": [{"value": "111-1-11-111111-0"}, {"value": "1111111111111"}],
}

expected_isbn = "111-1-11-111111-0, 1111111111111"
schema = BibTexCommonSchema()

result = schema.dump(record).data
result_isbn = result["isbn"]
assert expected_isbn == result_isbn
with pytest.raises(NotValidISBNError):
schema.dump(record).data


def test_eprint():
Expand Down

0 comments on commit 16354bf

Please sign in to comment.