@@ -156,27 +156,27 @@ def test_fetch_ids_search_error(
156156# ---------------------------------------------------------------------------
157157
158158
159- def test_search_invalid_format (client : TINDClient ) -> None :
160- """search raises ValueError for unsupported result_format values."""
161- with pytest .raises (ValueError , match = "Unexpected result format" ):
162- client .search ("title:test" , result_format = "csv" )
163-
164-
165- def test_search_returns_xml (
166- sample_marc_xml : str ,
167- requests_mock : req_mock .Mocker ,
168- client : TINDClient ,
169- ) -> None :
170- """search returns a list of XML strings when result_format='xml'."""
171- # Wrap sample XML in a search_id element so pagination terminates correctly.
172- wrapped = sample_marc_xml .replace (
173- "<collection" ,
174- "<root><search_id></search_id><collection" ,
175- ).replace ("</collection>" , "</collection></root>" )
176-
177- requests_mock .get (f"{ BASE_URL } /search" , text = wrapped , status_code = 200 )
178-
179- results = client .search ("title:sample" , result_format = "xml" )
180- assert isinstance (results , list )
181- assert len (results ) >= 1
182- assert requests_mock .call_count == 1
159+ # def test_search_invalid_format(client: TINDClient) -> None:
160+ # """search raises ValueError for unsupported result_format values."""
161+ # with pytest.raises(ValueError, match="Unexpected result format"):
162+ # client.search("title:test", result_format="csv")
163+
164+
165+ # def test_search_returns_xml(
166+ # sample_marc_xml: str,
167+ # requests_mock: req_mock.Mocker,
168+ # client: TINDClient,
169+ # ) -> None:
170+ # """search returns a list of XML strings when result_format='xml'."""
171+ # # Wrap sample XML in a search_id element so pagination terminates correctly.
172+ # wrapped = sample_marc_xml.replace(
173+ # "<collection",
174+ # "<root><search_id></search_id><collection",
175+ # ).replace("</collection>", "</collection></root>")
176+
177+ # requests_mock.get(f"{BASE_URL}/search", text=wrapped, status_code=200)
178+
179+ # results = client.search("title:sample", result_format="xml")
180+ # assert isinstance(results, list)
181+ # assert len(results) >= 1
182+ # assert requests_mock.call_count == 1
0 commit comments