Skip to content

Commit 553d30b

Browse files
committed
adjust test
1 parent db5f577 commit 553d30b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/aws-library/tests/test_ec2_client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,9 +827,12 @@ async def mock_run_instances(*args, **kwargs):
827827
assert call_count == 2
828828

829829
# Verify the error contains the expected information
830+
subnet_desc = await ec2_client.describe_subnets(SubnetIds=[aws_subnet_id])
830831
assert hasattr(exc_info.value, "instance_type")
831832
assert exc_info.value.instance_type == fake_ec2_instance_type.name # type: ignore
832-
assert exc_info.value.subnet_ids == [aws_subnet_id] # type: ignore
833+
assert exc_info.value.availability_zones == [ # type: ignore
834+
subnet_desc["Subnets"][0]["AvailabilityZone"] # type: ignore
835+
]
833836

834837
# Verify still only 2 instances exist (no new ones were created)
835838
await _assert_instances_in_ec2(

0 commit comments

Comments
 (0)