Skip to content

Commit ea8560a

Browse files
Fix deprecation warnings (#673)
1 parent c53fcf3 commit ea8560a

File tree

6 files changed

+16
-17
lines changed

6 files changed

+16
-17
lines changed

setup.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ asyncio_mode = auto
55
xfail_strict = true
66
filterwarnings=
77
error
8-
ignore::DeprecationWarning

tests/test_cookies_identity.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async def authorized_userid(self, identity):
1515
pass
1616

1717

18-
async def test_remember(loop, aiohttp_client):
18+
async def test_remember(aiohttp_client):
1919

2020
async def handler(request):
2121
response = web.Response()
@@ -31,7 +31,7 @@ async def handler(request):
3131
assert 'Andrew' == resp.cookies['AIOHTTP_SECURITY'].value
3232

3333

34-
async def test_identify(loop, aiohttp_client):
34+
async def test_identify(aiohttp_client):
3535

3636
async def create(request):
3737
response = web.Response()
@@ -56,7 +56,7 @@ async def check(request):
5656
assert 200 == resp.status
5757

5858

59-
async def test_forget(loop, aiohttp_client):
59+
async def test_forget(aiohttp_client):
6060

6161
async def index(request):
6262
return web.Response()

tests/test_dict_autz.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ async def authorized_userid(self, identity):
2424
return None
2525

2626

27-
async def test_authorized_userid(loop, aiohttp_client):
27+
async def test_authorized_userid(aiohttp_client):
2828

2929
async def login(request):
3030
response = web.HTTPFound(location='/')
@@ -48,7 +48,7 @@ async def check(request):
4848
assert 'Andrew' == txt
4949

5050

51-
async def test_authorized_userid_not_authorized(loop, aiohttp_client):
51+
async def test_authorized_userid_not_authorized(aiohttp_client):
5252

5353
async def check(request):
5454
userid = await authorized_userid(request)
@@ -64,7 +64,7 @@ async def check(request):
6464
assert 200 == resp.status
6565

6666

67-
async def test_permits_enum_permission(loop, aiohttp_client):
67+
async def test_permits_enum_permission(aiohttp_client):
6868
class Permission(enum.Enum):
6969
READ = '101'
7070
WRITE = '102'
@@ -107,7 +107,7 @@ async def check(request):
107107
assert 200 == resp.status
108108

109109

110-
async def test_permits_unauthorized(loop, aiohttp_client):
110+
async def test_permits_unauthorized(aiohttp_client):
111111

112112
async def check(request):
113113
ret = await permits(request, 'read')
@@ -126,7 +126,7 @@ async def check(request):
126126
assert 200 == resp.status
127127

128128

129-
async def test_is_anonymous(loop, aiohttp_client):
129+
async def test_is_anonymous(aiohttp_client):
130130

131131
async def index(request):
132132
is_anon = await is_anonymous(request)
@@ -162,7 +162,7 @@ async def logout(request):
162162
assert web.HTTPUnauthorized.status_code == resp.status
163163

164164

165-
async def test_check_authorized(loop, aiohttp_client):
165+
async def test_check_authorized(aiohttp_client):
166166
async def index(request):
167167
await check_authorized(request)
168168
return web.Response()
@@ -195,7 +195,7 @@ async def logout(request):
195195
assert web.HTTPUnauthorized.status_code == resp.status
196196

197197

198-
async def test_check_permission(loop, aiohttp_client):
198+
async def test_check_permission(aiohttp_client):
199199

200200
async def index_read(request):
201201
await check_permission(request, 'read')

tests/test_jwt_identity.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async def test_no_pyjwt_installed(mocker):
3535
JWTIdentityPolicy('secret')
3636

3737

38-
async def test_identify(loop, make_token, aiohttp_client):
38+
async def test_identify(make_token, aiohttp_client):
3939
kwt_secret_key = "Key" # noqa: S105
4040

4141
token = make_token({'login': 'Andrew'}, kwt_secret_key)
@@ -56,7 +56,7 @@ async def check(request):
5656
assert 200 == resp.status
5757

5858

59-
async def test_identify_broken_scheme(loop, make_token, aiohttp_client):
59+
async def test_identify_broken_scheme(make_token, aiohttp_client):
6060
kwt_secret_key = "Key" # noqa: S105
6161

6262
token = make_token({'login': 'Andrew'}, kwt_secret_key)

tests/test_no_auth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from aiohttp_security import authorized_userid, permits
44

55

6-
async def test_authorized_userid(loop, aiohttp_client):
6+
async def test_authorized_userid(aiohttp_client):
77

88
async def check(request):
99
userid = await authorized_userid(request)
@@ -17,7 +17,7 @@ async def check(request):
1717
assert 200 == resp.status
1818

1919

20-
async def test_permits(loop, aiohttp_client):
20+
async def test_permits(aiohttp_client):
2121

2222
async def check(request):
2323
ret = await permits(request, 'read')

tests/test_no_identity.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from aiohttp_security import forget, remember
44

55

6-
async def test_remember(loop, aiohttp_client):
6+
async def test_remember(aiohttp_client):
77

88
async def do_remember(request):
99
response = web.Response()
@@ -18,7 +18,7 @@ async def do_remember(request):
1818
assert exp == resp.reason
1919

2020

21-
async def test_forget(loop, aiohttp_client):
21+
async def test_forget(aiohttp_client):
2222

2323
async def do_forget(request):
2424
response = web.Response()

0 commit comments

Comments
 (0)