Skip to content

Commit

Permalink
update test statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Moasib-Arif committed Jul 23, 2024
1 parent ddb7025 commit af99cba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/email/test_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_ses_client_initialisation_invalid_sender_email():
with pytest.raises(ValueError) as e:
SesClient("invalid_email", "us-west-2")

assert "Invalid sender email: The email address is not valid." in str(e.value)
assert "Invalid sender email: An email address must have an @-sign." in str(e.value)


@mock_aws
Expand All @@ -60,7 +60,7 @@ def test_ses_client_send_invalid_recipient(mock_ses_client):
with pytest.raises(ValueError) as e:
mock_ses_client.send("invalid_email", "subject", "body")

assert "Invalid recipient email: The email address is not valid." in str(e.value)
assert "Invalid recipient email: An email address must have an @-sign." in str(e.value)


@mock_aws
Expand Down
3 changes: 3 additions & 0 deletions tests/http/dataset/test_dataset_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def test_post_json_success(mock_request):
verify=True,
)


@patch("requests.request")
def test_post_json_failure(mock_request):
"""
Expand All @@ -71,6 +72,7 @@ def test_post_json_failure(mock_request):
with pytest.raises(Exception):
mock_client.post_json()


@patch("requests.request")
def test_post_new_job_success(mock_request):
"""
Expand Down Expand Up @@ -105,6 +107,7 @@ def test_post_new_job_failure(mock_request):
with pytest.raises(Exception):
mock_client.post_new_job()


@patch("builtins.open", new_callable=mock_open, read_data='{"key": "value"}')
@patch("requests.request")
def test_upload_json(mock_request, mock_open_file):
Expand Down

0 comments on commit af99cba

Please sign in to comment.