Skip to content

Commit

Permalink
fixes warning a RuntimeWarning: coroutine 'setup' was never awaited
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Jul 18, 2022
1 parent 8322a9e commit 279a145
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
from simcore_service_director_v2.modules.dynamic_sidecar.api_client._public import (
DynamicSidecarClient,
get_dynamic_sidecar_client,
setup,
)
from simcore_service_director_v2.modules.dynamic_sidecar.api_client._public import (
setup as api_client_setup,
)
from simcore_service_director_v2.modules.dynamic_sidecar.api_client._public import (
shutdown,
)
from simcore_service_director_v2.modules.dynamic_sidecar.errors import (
Expand Down Expand Up @@ -61,7 +65,8 @@ async def dynamic_sidecar_client(
app = FastAPI()
app.state.settings = AppSettings.create_from_envs()

await setup(app)
# WARNING: pytest gets confused with 'setup', use instead alias 'api_client_setup'
await api_client_setup(app)
yield get_dynamic_sidecar_client(app)
await shutdown(app)

Expand Down

0 comments on commit 279a145

Please sign in to comment.