Skip to content

Commit 276eae6

Browse files
test: fix broken tests due to wild card import (#1240)
1 parent 63598b0 commit 276eae6

File tree

6 files changed

+10
-5
lines changed

6 files changed

+10
-5
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
runs-on: ubuntu-20.04
1212
timeout-minutes: 10
1313
strategy:
14+
fail-fast: false
1415
matrix:
1516
python-version:
1617
- "3.6"

requirements/adapter.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pyramid>=1,<3
1616
sanic>=20,<21; python_version=="3.6"
1717
sanic>=21,<24; python_version>"3.6" and python_version<="3.8"
1818
sanic>=21,<25; python_version>"3.8"
19-
starlette>=0.14,<1
19+
starlette>=0.19.1,<1
2020
tornado>=6,<7
2121
uvicorn<1 # The oldest version can vary among Python runtime versions
2222
gunicorn>=20,<24

tests/adapter_tests/starlette/test_fastapi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ async def endpoint(req: Request):
206206
return await app_handler.handle(req)
207207

208208
client = TestClient(api)
209-
response = client.get("/slack/install", allow_redirects=False)
209+
client.follow_redirects = False
210+
response = client.get("/slack/install")
210211
assert response.status_code == 200
211212
assert response.headers.get("content-type") == "text/html; charset=utf-8"
212213
assert "https://slack.com/oauth/v2/authorize?state=" in response.text

tests/adapter_tests/starlette/test_starlette.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ async def endpoint(req: Request):
215215
routes=[Route("/slack/install", endpoint=endpoint, methods=["GET"])],
216216
)
217217
client = TestClient(api)
218-
response = client.get("/slack/install", allow_redirects=False)
218+
client.follow_redirects = False
219+
response = client.get("/slack/install")
219220
assert response.status_code == 200
220221
assert response.headers.get("content-type") == "text/html; charset=utf-8"
221222
assert "https://slack.com/oauth/v2/authorize?state=" in response.text

tests/adapter_tests_async/test_async_fastapi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ async def endpoint(req: Request):
206206
return await app_handler.handle(req)
207207

208208
client = TestClient(api)
209-
response = client.get("/slack/install", allow_redirects=False)
209+
client.follow_redirects = False
210+
response = client.get("/slack/install")
210211
assert response.status_code == 200
211212
assert response.headers.get("content-type") == "text/html; charset=utf-8"
212213
assert response.headers.get("content-length") == "607"

tests/adapter_tests_async/test_async_starlette.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ async def endpoint(req: Request):
216216
)
217217

218218
client = TestClient(api)
219-
response = client.get("/slack/install", allow_redirects=False)
219+
client.follow_redirects = False
220+
response = client.get("/slack/install")
220221
assert response.status_code == 200
221222
assert response.headers.get("content-type") == "text/html; charset=utf-8"
222223
assert response.headers.get("content-length") == "607"

0 commit comments

Comments
 (0)