Skip to content

Commit

Permalink
Remove HEAD request failure handling from test_laads_available.
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkinsspatial committed Feb 7, 2024
1 parent 48e7446 commit 665870d
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions lambda_functions/tests/test_laads_available.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,3 @@ def test_handler(s3):

response = handler(event, {})
assert response == expected

# def head_object_notexists(Bucket, Key):
# raise ClientError(
# error_response={"Error": {"Code": "404"}}, operation_name="head_obj"
# )

# monkeypatch.setattr(
# lambda_functions.laads_available.s3, "head_object", head_object_notexists
# )
# ret = handler(event, {})
# response["available"] = False
# assert ret == response

# def head_object_exception(Bucket, Key):
# raise ClientError(
# error_response={"Error": {"Code": "403"}}, operation_name="head_obj"
# )

# monkeypatch.setattr(
# lambda_functions.laads_available.s3, "head_object", head_object_exception
# )

# with pytest.raises(Exception):
# ret = handler(event, {})
# assert ret == response

0 comments on commit 665870d

Please sign in to comment.