Skip to content

Commit

Permalink
correct names in tests (aio-libs#3994)
Browse files Browse the repository at this point in the history
* correct names in tests

* add change

* undo unnecessary change
  • Loading branch information
samuelcolvin authored Aug 19, 2019
1 parent e804981 commit 9e0fa0a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGES/3994.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
correct the names of some fuctions in ``tests/test_client_functional.py``
12 changes: 6 additions & 6 deletions tests/test_client_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -2075,11 +2075,11 @@ async def handler_redirect(request):

async def test_raise_for_status(aiohttp_client) -> None:

async def handler_redirect(request):
async def handler(request):
raise web.HTTPBadRequest()

app = web.Application()
app.router.add_route('GET', '/', handler_redirect)
app.router.add_route('GET', '/', handler)
client = await aiohttp_client(app, raise_for_status=True)

with pytest.raises(aiohttp.ClientResponseError):
Expand All @@ -2088,11 +2088,11 @@ async def handler_redirect(request):

async def test_raise_for_status_per_request(aiohttp_client) -> None:

async def handler_redirect(request):
async def handler(request):
raise web.HTTPBadRequest()

app = web.Application()
app.router.add_route('GET', '/', handler_redirect)
app.router.add_route('GET', '/', handler)
client = await aiohttp_client(app)

with pytest.raises(aiohttp.ClientResponseError):
Expand All @@ -2101,11 +2101,11 @@ async def handler_redirect(request):

async def test_raise_for_status_disable_per_request(aiohttp_client) -> None:

async def handler_redirect(request):
async def handler(request):
raise web.HTTPBadRequest()

app = web.Application()
app.router.add_route('GET', '/', handler_redirect)
app.router.add_route('GET', '/', handler)
client = await aiohttp_client(app, raise_for_status=True)

resp = await client.get('/', raise_for_status=False)
Expand Down

0 comments on commit 9e0fa0a

Please sign in to comment.