File use-correct-warning-pytest-warns.patch of Package python-aiohttp.42491
Index: aiohttp-3.9.3/tests/test_pytest_plugin.py
===================================================================
--- aiohttp-3.9.3.orig/tests/test_pytest_plugin.py
+++ aiohttp-3.9.3/tests/test_pytest_plugin.py
@@ -74,7 +74,7 @@ async def test_noop() -> None:
async def previous(request):
if request.method == 'POST':
- with pytest.deprecated_call(): # FIXME: this isn't actually called
+ with pytest.warns(UserWarning):
request.app['value'] = (await request.post())['value']
return web.Response(body=b'thanks for the data')
else:
@@ -106,7 +106,7 @@ async def test_get_value(cli) -> None:
assert resp.status == 200
text = await resp.text()
assert text == 'value: unknown'
- with pytest.warns(DeprecationWarning):
+ with pytest.warns(UserWarning):
cli.server.app['value'] = 'bar'
resp = await cli.get('/')
assert resp.status == 200