@@ -93,7 +93,7 @@ async def test_generic_update_strategy_finds_latest_release_version(
93
93
app = app_factory (versions )
94
94
95
95
# When
96
- async with AsyncClient (app = app ) as client :
96
+ async with AsyncClient (transport = httpx . ASGITransport ( app = app ) ) as client :
97
97
update_strategy = GenericUpdateStrategy (client )
98
98
latest_version = await update_strategy (blueprint )
99
99
@@ -112,7 +112,7 @@ async def test_generic_update_strategy_finds_latest_release_version_when_version
112
112
app = app_factory (["2.0.0" ])
113
113
114
114
# When
115
- async with AsyncClient (app = app ) as client :
115
+ async with AsyncClient (transport = httpx . ASGITransport ( app = app ) ) as client :
116
116
update_strategy = GenericUpdateStrategy (client )
117
117
latest_version = await update_strategy (blueprint )
118
118
@@ -133,7 +133,7 @@ async def test_github_update_strategy_should_find_expected_blueprint_release(
133
133
):
134
134
app = github_app_factory (tag_name )
135
135
blueprint = blueprint_factory (fetch = fetch_url )
136
- async with AsyncClient (app = app ) as client :
136
+ async with AsyncClient (transport = httpx . ASGITransport ( app = app ) ) as client :
137
137
update_strategy = GithubUpdateStrategy (client )
138
138
assert await update_strategy (blueprint ) == "2.3.0"
139
139
@@ -144,7 +144,7 @@ async def test_github_update_strategy_should_not_return_an_older_version_than_cu
144
144
app = github_app_factory ("0.1.0" , versions = ["1.0.0" ])
145
145
url = "https://github.com/owner/name/releases/{{version}}/some-app.tar.gz"
146
146
blueprint = blueprint_factory (fetch = url )
147
- async with AsyncClient (app = app ) as client :
147
+ async with AsyncClient (transport = httpx . ASGITransport ( app = app ) ) as client :
148
148
update_strategy = GithubUpdateStrategy (client )
149
149
assert await update_strategy (blueprint ) == "1.0.0"
150
150
@@ -155,7 +155,7 @@ async def test_github_update_strategy_should_fail_gracefully_when_asset_not_foun
155
155
app = github_app_factory ("someapp-v2.3" )
156
156
url = "https://github.com/owner/name/releases/someapp-v{{version}}/some-app.tar.gz"
157
157
blueprint = blueprint_factory (fetch = url )
158
- async with AsyncClient (app = app ) as client :
158
+ async with AsyncClient (transport = httpx . ASGITransport ( app = app ) ) as client :
159
159
with pytest .raises (Ops2debUpdaterError ) as e :
160
160
await GithubUpdateStrategy (client )(blueprint )
161
161
assert "Failed to determine latest release URL" in str (e )
0 commit comments