"""Shared pytest fixtures for BibAPI tests."""
import pytest
@pytest.fixture
def sample_marc_record_xml() -> str:
"""Sample MARC record XML for testing."""
return """
00000nam a22000001i 4500
123456789
20230101120000.0
9783123456789
ger
Test Book Title
A Subtitle
2nd edition
Berlin
Test Publisher
2023
456 pages
Band
Author, Test
Frei 129
ABC 123
DE-Frei129
"""
@pytest.fixture
def sample_sru_response_xml() -> bytes:
"""Sample SRU searchRetrieveResponse XML for testing."""
return b"""
1.1
1
marcxml
xml
00000nam a22
123456789
9783123456789
ger
Test Book
1st edition
Publisher
2023
200 pages
Band
Author, Test
DE-Frei129
1
1.1
pica.tit=Test
100
xml
marcxml
"""
@pytest.fixture
def mock_catalogue_html() -> str:
"""Sample HTML response from catalogue search."""
return """
Book Title
"""
@pytest.fixture
def mock_catalogue_detail_html() -> str:
"""Sample HTML response from catalogue book detail page."""
return """
Test Book Title
123456789
2nd ed.
9783123456789
300 pages
"""