File tree Expand file tree Collapse file tree 5 files changed +15
-6
lines changed
Expand file tree Collapse file tree 5 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ async def test_delete_human(self) -> None:
120120 self .assertNotIsInstance (e , TimeoutError )
121121 pass
122122
123- async def test_run_human (self ):
123+ async def test_run_human (self ) -> None :
124124 name = utils .random_name ()
125125
126126 async with AsyncExitStack () as stack :
Original file line number Diff line number Diff line change 11# This file was automatically generated. DO NOT EDIT.
22# If you have any remark or suggestion do not hesitate to open an issue.
3+ import importlib
4+ from typing import TYPE_CHECKING
35from .types import Arch
46from .types import BootType
57from .types import ImageState
113115from .content import TASK_TRANSIENT_STATUSES
114116from .content import VOLUME_SERVER_TRANSIENT_STATUSES
115117from .content import VOLUME_TRANSIENT_STATUSES
116- from .api import InstanceV1API
118+
119+ try :
120+ from .api_utils import InstanceV1UtilsAPI as InstanceV1API # type: ignore
121+ except ImportError :
122+ from .api import InstanceV1API
123+ except ModuleNotFoundError :
124+ from .api import InstanceV1API
117125
118126__all__ = [
119127 "Arch" ,
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ def test_delete_human(self) -> None:
120120 self .assertNotIsInstance (e , TimeoutError )
121121 pass
122122
123- def test_run_human (self ):
123+ def test_run_human (self ) -> None :
124124 name = utils .random_name ()
125125
126126 with ExitStack () as stack :
Original file line number Diff line number Diff line change @@ -110,19 +110,20 @@ def test_unmarshal_Human(self) -> None:
110110 self ._assert_raw_and_unmarshalled_human (data , human )
111111
112112 def test_unmarshal_ListHumansResponse (self ) -> None :
113+ humans = [_mock_human_raw () for _ in range (10 )]
113114 data = {
114- "humans" : [ _mock_human_raw () for _ in range ( 10 )] ,
115+ "humans" : humans ,
115116 "total_count" : 1 ,
116117 }
117118
118119 list_humans_response = unmarshal_ListHumansResponse (data )
119120
120121 self .assertTrue (isinstance (list_humans_response , ListHumansResponse ))
121- self .assertEqual (len (list_humans_response .humans ), len (data [ " humans" ] ))
122+ self .assertEqual (len (list_humans_response .humans ), len (humans ))
122123
123124 for i in range (len (list_humans_response .humans )):
124125 self ._assert_raw_and_unmarshalled_human (
125- data [ " humans" ] [i ], list_humans_response .humans [i ]
126+ humans [i ], list_humans_response .humans [i ]
126127 )
127128
128129
You can’t perform that action at this time.
0 commit comments