make compatible tests
This commit is contained in:
parent
6e4355ce3c
commit
d652f29df5
|
@ -94,14 +94,14 @@ def test_forget(loop, test_client):
|
||||||
client = yield from test_client(app)
|
client = yield from test_client(app)
|
||||||
resp = yield from client.post('/login')
|
resp = yield from client.post('/login')
|
||||||
assert 200 == resp.status
|
assert 200 == resp.status
|
||||||
assert resp.url.endswith('/')
|
assert str(resp.url).endswith('/')
|
||||||
cookies = client.session.cookie_jar.filter_cookies(
|
cookies = client.session.cookie_jar.filter_cookies(
|
||||||
client.make_url('/'))
|
client.make_url('/'))
|
||||||
assert 'Andrew' == cookies['AIOHTTP_SECURITY'].value
|
assert 'Andrew' == cookies['AIOHTTP_SECURITY'].value
|
||||||
yield from resp.release()
|
yield from resp.release()
|
||||||
resp = yield from client.post('/logout')
|
resp = yield from client.post('/logout')
|
||||||
assert 200 == resp.status
|
assert 200 == resp.status
|
||||||
assert resp.url.endswith('/')
|
assert str(resp.url).endswith('/')
|
||||||
cookies = client.session.cookie_jar.filter_cookies(
|
cookies = client.session.cookie_jar.filter_cookies(
|
||||||
client.make_url('/'))
|
client.make_url('/'))
|
||||||
assert 'AIOHTTP_SECURITY' not in cookies
|
assert 'AIOHTTP_SECURITY' not in cookies
|
||||||
|
|
|
@ -116,14 +116,14 @@ def test_forget(make_app, test_client):
|
||||||
|
|
||||||
resp = yield from client.post('/login')
|
resp = yield from client.post('/login')
|
||||||
assert 200 == resp.status
|
assert 200 == resp.status
|
||||||
assert resp.url.endswith('/')
|
assert str(resp.url).endswith('/')
|
||||||
txt = yield from resp.text()
|
txt = yield from resp.text()
|
||||||
assert 'Andrew' == txt
|
assert 'Andrew' == txt
|
||||||
yield from resp.release()
|
yield from resp.release()
|
||||||
|
|
||||||
resp = yield from client.post('/logout')
|
resp = yield from client.post('/logout')
|
||||||
assert 200 == resp.status
|
assert 200 == resp.status
|
||||||
assert resp.url.endswith('/')
|
assert str(resp.url).endswith('/')
|
||||||
txt = yield from resp.text()
|
txt = yield from resp.text()
|
||||||
assert '' == txt
|
assert '' == txt
|
||||||
yield from resp.release()
|
yield from resp.release()
|
||||||
|
|
Loading…
Reference in New Issue