Skip to content

Commit

Permalink
[3.5] Add test for #3515 (#3517) (#3534)
Browse files Browse the repository at this point in the history
(cherry picked from commit aa5cccb)

Co-authored-by: Miha Jenko <[email protected]>
  • Loading branch information
asvetlov and mihajenko authored Jan 14, 2019
1 parent c6ee1a7 commit e5971e3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_client_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -1919,6 +1919,22 @@ async def handler(request):
resp.close()


async def test_cookies_on_empty_session_jar(aiohttp_client) -> None:
async def handler(request):
assert 'custom-cookie' in request.cookies
assert request.cookies['custom-cookie'] == 'abc'
return web.Response()

app = web.Application()
app.router.add_get('/', handler)
client = await aiohttp_client(
app, cookies=None)

resp = await client.get('/', cookies={'custom-cookie': 'abc'})
assert 200 == resp.status
resp.close()


async def test_morsel_with_attributes(aiohttp_client) -> None:
# A comment from original test:
#
Expand Down

0 comments on commit e5971e3

Please sign in to comment.