Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix broken tests due to wild card import #1240

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
runs-on: ubuntu-20.04
timeout-minutes: 10
strategy:
fail-fast: false
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to allow maintainers to easily tell what versions of python may be affected by failing CI tests

matrix:
python-version:
- "3.6"
Expand Down
2 changes: 1 addition & 1 deletion requirements/adapter.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pyramid>=1,<3
sanic>=20,<21; python_version=="3.6"
sanic>=21,<24; python_version>"3.6" and python_version<="3.8"
sanic>=21,<25; python_version>"3.8"
starlette>=0.14,<1
starlette>=0.19.1,<1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

starlette 0.19.1 is the latest version of this package that supports python 3.6

tornado>=6,<7
uvicorn<1 # The oldest version can vary among Python runtime versions
gunicorn>=20,<24
Expand Down
3 changes: 2 additions & 1 deletion tests/adapter_tests/starlette/test_fastapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ async def endpoint(req: Request):
return await app_handler.handle(req)

client = TestClient(api)
response = client.get("/slack/install", allow_redirects=False)
client.follow_redirects = False
response = client.get("/slack/install")
assert response.status_code == 200
assert response.headers.get("content-type") == "text/html; charset=utf-8"
assert "https://slack.com/oauth/v2/authorize?state=" in response.text
Expand Down
3 changes: 2 additions & 1 deletion tests/adapter_tests/starlette/test_starlette.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ async def endpoint(req: Request):
routes=[Route("/slack/install", endpoint=endpoint, methods=["GET"])],
)
client = TestClient(api)
response = client.get("/slack/install", allow_redirects=False)
client.follow_redirects = False
response = client.get("/slack/install")
assert response.status_code == 200
assert response.headers.get("content-type") == "text/html; charset=utf-8"
assert "https://slack.com/oauth/v2/authorize?state=" in response.text
3 changes: 2 additions & 1 deletion tests/adapter_tests_async/test_async_fastapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ async def endpoint(req: Request):
return await app_handler.handle(req)

client = TestClient(api)
response = client.get("/slack/install", allow_redirects=False)
client.follow_redirects = False
response = client.get("/slack/install")
assert response.status_code == 200
assert response.headers.get("content-type") == "text/html; charset=utf-8"
assert response.headers.get("content-length") == "607"
Expand Down
3 changes: 2 additions & 1 deletion tests/adapter_tests_async/test_async_starlette.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ async def endpoint(req: Request):
)

client = TestClient(api)
response = client.get("/slack/install", allow_redirects=False)
client.follow_redirects = False
response = client.get("/slack/install")
assert response.status_code == 200
assert response.headers.get("content-type") == "text/html; charset=utf-8"
assert response.headers.get("content-length") == "607"
Expand Down