diff --git a/invenio_rdm_records/resources/serializers/bibtex/schema.py b/invenio_rdm_records/resources/serializers/bibtex/schema.py index e9c4ed258..cd976ef42 100644 --- a/invenio_rdm_records/resources/serializers/bibtex/schema.py +++ b/invenio_rdm_records/resources/serializers/bibtex/schema.py @@ -52,6 +52,7 @@ class BibTexSchema(BaseSerializerSchema, CommonFieldsMixin): BibTexFormatter.in_proceedings, BibTexFormatter.proceedings, ], + "publication-conferenceproceeding": [BibTexFormatter.proceedings], "publication-book": [ BibTexFormatter.book, BibTexFormatter.booklet, diff --git a/tests/resources/serializers/test_bibtex_serializer.py b/tests/resources/serializers/test_bibtex_serializer.py index d42d5c2d0..94bf492c7 100644 --- a/tests/resources/serializers/test_bibtex_serializer.py +++ b/tests/resources/serializers/test_bibtex_serializer.py @@ -89,7 +89,6 @@ def test_bibtex_serializer_full_record(running_app, updated_full_record): ("publication"), ("publication-annotationcollection"), ("publication-section"), - ("publication-conferenceproceeding"), ("publication-datamanagementplan"), ("publication-journal"), ("publication-patent"), @@ -198,6 +197,34 @@ def test_serialize_publication_conferencepaper(running_app, updated_minimal_reco ) +def test_serialize_publication_conferenceproceeding( + running_app, updated_minimal_record +): + """Test bibtex formatter for conference proceedings. + + It serializes into 'proceedings'. + """ + updated_minimal_record["metadata"]["resource_type"][ + "id" + ] = "publication-conferenceproceeding" + + serializer = BibtexSerializer() + serialized_record = serializer.serialize_object(updated_minimal_record) + + expected_data = "\n".join( + [ + "@proceedings{brown_2023_abcde-fghij,", + " title = {A Romans story},", + " year = 2023,", + " publisher = {Acme Inc},", + " month = mar,", + "}", + ] + ) + + assert serialized_record == expected_data + + def test_serialize_publication_book(running_app, updated_minimal_record): """Test bibtex formatter for books.