@@ -52,8 +52,7 @@ async def simcore_ec2_api(
5252 await ec2 .close ()
5353
5454
55- async def test_ec2_client_lifespan (simcore_ec2_api : SimcoreEC2API ):
56- ...
55+ async def test_ec2_client_lifespan (simcore_ec2_api : SimcoreEC2API ): ...
5756
5857
5958async def test_aiobotocore_ec2_client_when_ec2_server_goes_up_and_down (
@@ -107,12 +106,12 @@ async def test_get_ec2_instance_capabilities(
107106 simcore_ec2_api : SimcoreEC2API ,
108107 ec2_allowed_instances : list [InstanceTypeType ],
109108):
110- instance_types : list [
111- EC2InstanceType
112- ] = await simcore_ec2_api . get_ec2_instance_capabilities (
113- cast (
114- set [ InstanceTypeType ] ,
115- set ( ec2_allowed_instances ),
109+ instance_types : list [EC2InstanceType ] = (
110+ await simcore_ec2_api . get_ec2_instance_capabilities (
111+ cast (
112+ set [ InstanceTypeType ],
113+ set ( ec2_allowed_instances ) ,
114+ )
116115 )
117116 )
118117 assert instance_types
@@ -125,7 +124,9 @@ async def test_get_ec2_instance_capabilities_returns_all_options(
125124 instance_types = await simcore_ec2_api .get_ec2_instance_capabilities ("ALL" )
126125 assert instance_types
127126 # NOTE: this might need adaptation when moto is updated
128- assert 700 < len (instance_types ) < 852
127+ assert (
128+ 850 < len (instance_types ) < 877
129+ ), f"received { len (instance_types )} , the test might need adaptation"
129130
130131
131132async def test_get_ec2_instance_capabilities_raise_with_empty_set (
@@ -151,9 +152,9 @@ async def fake_ec2_instance_type(
151152 request : pytest .FixtureRequest ,
152153) -> EC2InstanceType :
153154 instance_type_name : InstanceTypeType = request .param
154- instance_types : list [
155- EC2InstanceType
156- ] = await simcore_ec2_api . get_ec2_instance_capabilities ({ instance_type_name } )
155+ instance_types : list [EC2InstanceType ] = (
156+ await simcore_ec2_api . get_ec2_instance_capabilities ({ instance_type_name })
157+ )
157158
158159 assert len (instance_types ) == 1
159160 return instance_types [0 ]
0 commit comments