Skip to content

Commit

Permalink
feat: add test get schedule groupe not found
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhoheiser committed Jan 9, 2025
1 parent 69f9918 commit c098850
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_scheduler/test_schedule_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,15 @@ def test_list_schedule_groups():
groups = client.list_schedule_groups()["ScheduleGroups"]
assert len(groups) == 2
assert groups[1]["Arn"] == arn1


@mock_aws
def test_get_schedule_groupe_not_found():
client = boto3.client("scheduler", region_name="eu-west-1")

with pytest.raises(ClientError) as exc:
client.get_schedule_group(Name="sg")
err = exc.value.response["Error"]
assert err["Message"] == "Schedule group sg does not exist."
assert err["Code"] == "ResourceNotFoundException"
assert exc.value.response["ResponseMetadata"]["HTTPStatusCode"] == 404

0 comments on commit c098850

Please sign in to comment.