Skip to content

Commit 5bc006a

Browse files
committed
Fix more lint errors and upgrade flake8
1 parent 02111f5 commit 5bc006a

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
hooks:
1111
- id: black
1212
- repo: https://gitlab.com/pycqa/flake8
13-
rev: 3.7.7
13+
rev: 4.0.1
1414
hooks:
1515
- id: flake8
1616
additional_dependencies: [flake8-bugbear]

tests/test_multiple_token_locations.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ def access_protected():
5555

5656

5757
def test_header_access(app, app_with_locations):
58-
for app in (app, app_with_locations):
58+
for test_app in (app, app_with_locations):
5959
test_client = app.test_client()
60-
with app.test_request_context():
60+
with test_app.test_request_context():
6161
access_token = create_access_token("username")
6262

6363
access_headers = {"Authorization": "Bearer {}".format(access_token)}
@@ -67,18 +67,18 @@ def test_header_access(app, app_with_locations):
6767

6868

6969
def test_cookie_access(app, app_with_locations):
70-
for app in (app, app_with_locations):
71-
test_client = app.test_client()
70+
for test_app in (app, app_with_locations):
71+
test_client = test_app.test_client()
7272
test_client.get("/cookie_login")
7373
response = test_client.get("/protected")
7474
assert response.status_code == 200
7575
assert response.get_json() == {"foo": "bar", "location": "cookies"}
7676

7777

7878
def test_query_string_access(app, app_with_locations):
79-
for app in (app, app_with_locations):
80-
test_client = app.test_client()
81-
with app.test_request_context():
79+
for test_app in (app, app_with_locations):
80+
test_client = test_app.test_client()
81+
with test_app.test_request_context():
8282
access_token = create_access_token("username")
8383

8484
url = "/protected?jwt={}".format(access_token)
@@ -88,9 +88,9 @@ def test_query_string_access(app, app_with_locations):
8888

8989

9090
def test_json_access(app, app_with_locations):
91-
for app in (app, app_with_locations):
92-
test_client = app.test_client()
93-
with app.test_request_context():
91+
for test_app in (app, app_with_locations):
92+
test_client = test_app.test_client()
93+
with test_app.test_request_context():
9494
access_token = create_access_token("username")
9595
data = {"access_token": access_token}
9696
response = test_client.post("/protected", json=data)

0 commit comments

Comments
 (0)