diff --git a/services/autoscaling/tests/unit/test_utils_ec2.py b/services/autoscaling/tests/unit/test_utils_ec2.py index a55645af51de..4fc17a95a344 100644 --- a/services/autoscaling/tests/unit/test_utils_ec2.py +++ b/services/autoscaling/tests/unit/test_utils_ec2.py @@ -5,12 +5,10 @@ import pytest from aws_library.ec2 import EC2InstanceType, Resources +from aws_library.ec2._errors import EC2InstanceNotFoundError from faker import Faker from pydantic import ByteSize -from simcore_service_autoscaling.core.errors import ( - ConfigurationError, - Ec2InstanceNotFoundError, -) +from simcore_service_autoscaling.core.errors import ConfigurationError from simcore_service_autoscaling.utils.utils_ec2 import ( closest_instance_policy, compose_user_data, @@ -30,7 +28,7 @@ async def test_find_best_fitting_ec2_instance_with_no_instances_raises(): async def test_find_best_fitting_ec2_instance_closest_instance_policy_with_resource_0_raises( random_fake_available_instances: list[EC2InstanceType], ): - with pytest.raises(Ec2InstanceNotFoundError): + with pytest.raises(EC2InstanceNotFoundError): find_best_fitting_ec2_instance( allowed_ec2_instances=random_fake_available_instances, resources=Resources(cpus=0, ram=ByteSize(0)),