From 84a5a89724490523f70b760f5df6b3a295bfe008 Mon Sep 17 00:00:00 2001 From: Charlotte Kostelic Date: Tue, 27 Feb 2024 12:34:28 -0500 Subject: [PATCH] added tests --- tests/test_metadata_api.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_metadata_api.py b/tests/test_metadata_api.py index e615eba..94afd95 100644 --- a/tests/test_metadata_api.py +++ b/tests/test_metadata_api.py @@ -744,6 +744,11 @@ def test_replace_lhr_no_recordFormat_passed( def test_search_my_holdings(self, stub_session, mock_session_response): assert stub_session.search_my_holdings(oclcNumber=12345).status_code == 200 + def test_search_my_holdings_no_oclcNumber_passed( + self, stub_session, mock_session_response + ): + assert stub_session.search_my_holdings(barcode=12345).status_code == 200 + def test_search_my_holdings_invalid_oclc_number(self, stub_session): msg = "Argument 'oclcNumber' does not look like real OCLC #." with pytest.raises(InvalidOclcNumber) as exc: @@ -764,6 +769,12 @@ def test_search_my_local_bibs_missing_query(self, stub_session, argm): def test_search_shared_print_lhr(self, stub_session, mock_session_response): assert stub_session.search_shared_print_lhr(oclcNumber=12345).status_code == 200 + @pytest.mark.http_code(200) + def test_search_shared_print_lhr_no_oclcNumber_passed( + self, stub_session, mock_session_response + ): + assert stub_session.search_shared_print_lhr(barcode=12345).status_code == 200 + def test_search_shared_print_lhr_with_invalid_oclc_number_passsed( self, stub_session ):