Skip to content

Commit

Permalink
add status code back to mock
Browse files Browse the repository at this point in the history
  • Loading branch information
m-goggins committed Nov 2, 2023
1 parent f8a8ce5 commit 1d89db3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def test_post_data_to_building_block(mocked_post, patched_azure_cred_manager):
)

# Test for failure
mocked_post.return_value = mock.Mock(json=(lambda: fhir_bundle))
mocked_post.return_value = mock.Mock(status_code=400, json=(lambda: fhir_bundle))
with pytest.raises(Exception) as e:
post_data_to_building_block(url="https://some_url", body=fhir_bundle)
assert "HTTPS://SOME_URL MESSAGE: " in str(e.value)

0 comments on commit 1d89db3

Please sign in to comment.