Skip to content

Commit

Permalink
added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
charlottekostelic committed Feb 27, 2024
1 parent 9c52d0f commit 84a5a89
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_metadata_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
):
Expand Down

0 comments on commit 84a5a89

Please sign in to comment.