Update to 0.3.0

This commit is contained in:
Andrew Svetlov
2018-09-06 13:06:55 +03:00
parent 097f7ecc43
commit 9b1d08c661
23 changed files with 418 additions and 177 deletions

View File

@@ -2,15 +2,15 @@ from aiohttp import web
from aiohttp_security import remember, forget
async def test_remember(loop, test_client):
async def test_remember(loop, aiohttp_client):
async def do_remember(request):
response = web.Response()
await remember(request, response, 'Andrew')
app = web.Application(loop=loop)
app = web.Application()
app.router.add_route('POST', '/', do_remember)
client = await test_client(app)
client = await aiohttp_client(app)
resp = await client.post('/')
assert 500 == resp.status
assert (('Security subsystem is not initialized, '
@@ -18,15 +18,15 @@ async def test_remember(loop, test_client):
resp.reason)
async def test_forget(loop, test_client):
async def test_forget(loop, aiohttp_client):
async def do_forget(request):
response = web.Response()
await forget(request, response)
app = web.Application(loop=loop)
app = web.Application()
app.router.add_route('POST', '/', do_forget)
client = await test_client(app)
client = await aiohttp_client(app)
resp = await client.post('/')
assert 500 == resp.status
assert (('Security subsystem is not initialized, '