Skip to content

Commit

Permalink
Pin fastapi test version to 0.87.0 (#2647)
Browse files Browse the repository at this point in the history
* Pin fastapi test version

* trigger ci

* Upgrade to 0.87

* Update txt file
  • Loading branch information
freddyaboulton committed Nov 14, 2022
1 parent 46f4fde commit 06353ca
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 26 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,30 @@
## New Features:
No changes to highlight.

## Bug Fixes:
* Updated the minimum FastApi used in tests to version 0.87 [@freddyaboulton](https://github.com/freddyaboulton) in [PR 2647](https://github.com/gradio-app/gradio/pull/2647)

## Documentation Changes:
No changes to highlight.

## Testing and Infrastructure Changes:
No changes to highlight.

## Breaking Changes:
No changes to highlight.

## Full Changelog:
No changes to highlight.

## Contributors Shoutout:
No changes to highlight.


# Version 3.9.1

## New Features:
No changes to highlight.

## Bug Fixes:
* Only set a min height on md and html when loading by [@pngwn](https://github.com/pngwn) in [PR 2623](https://github.com/gradio-app/gradio/pull/2623)

Expand Down
3 changes: 2 additions & 1 deletion test/requirements.in
Expand Up @@ -18,4 +18,5 @@ isort
flake8
httpx
pydantic
respx
respx
fastapi>=0.87.0
35 changes: 14 additions & 21 deletions test/requirements.txt
@@ -1,13 +1,17 @@
#
# This file is autogenerated by pip-compile with python 3.7
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# pip-compile --output-file=requirements.txt
#
alembic==1.8.1
# via mlflow
anyio==3.6.1
# via httpcore
# via
# httpcore
# starlette
appnope==0.1.3
# via ipython
asyncio==3.4.3
# via -r requirements.in
attrs==21.4.0
Expand Down Expand Up @@ -60,6 +64,8 @@ entrypoints==0.4
# via mlflow
everett[ini]==3.0.0
# via comet-ml
fastapi==0.87.0
# via -r requirements.in
filelock==3.7.1
# via
# huggingface-hub
Expand All @@ -76,8 +82,6 @@ gitpython==3.1.27
# via
# mlflow
# wandb
greenlet==1.1.2
# via sqlalchemy
gunicorn==20.1.0
# via mlflow
h11==0.12.0
Expand All @@ -102,17 +106,8 @@ imageio==2.19.5
importlib-metadata==4.2.0
# via
# alembic
# click
# flake8
# flask
# huggingface-hub
# jsonschema
# mako
# mlflow
# pluggy
# pytest
# sqlalchemy
# transformers
importlib-resources==5.8.0
# via
# alembic
Expand Down Expand Up @@ -221,7 +216,9 @@ py==1.11.0
pycodestyle==2.8.0
# via flake8
pydantic==1.9.1
# via -r requirements.in
# via
# -r requirements.in
# fastapi
pyflakes==2.4.0
# via flake8
pygments==2.12.0
Expand Down Expand Up @@ -322,6 +319,8 @@ sqlalchemy==1.4.39
# mlflow
sqlparse==0.4.2
# via mlflow
starlette==0.21.0
# via fastapi
tabulate==0.8.10
# via databricks-cli
threadpoolctl==3.1.0
Expand All @@ -348,18 +347,12 @@ traitlets==5.3.0
# matplotlib-inline
transformers==4.20.1
# via -r requirements.in
typed-ast==1.5.4
# via black
typing-extensions==4.3.0
# via
# anyio
# black
# gitpython
# huggingface-hub
# importlib-metadata
# jsonschema
# pydantic
# pytest-asyncio
# starlette
# torch
urllib3==1.26.10
# via
Expand Down
6 changes: 4 additions & 2 deletions test/test_blocks.py
Expand Up @@ -925,9 +925,11 @@ async def say_hello(name):
client = TestClient(app)

resp = client.post(
f"{demo.local_url}login", data={"username": "abc", "password": "123"}
f"{demo.local_url}login",
data={"username": "abc", "password": "123"},
follow_redirects=False,
)
assert resp.ok
assert resp.status_code == 302
token = resp.cookies.get("access-token")
assert token

Expand Down
8 changes: 6 additions & 2 deletions test/test_routes.py
Expand Up @@ -238,11 +238,15 @@ def test_post_login(self):
client = TestClient(app)

response = client.post(
"/login", data=dict(username="test", password="correct_password")
"/login",
data=dict(username="test", password="correct_password"),
follow_redirects=False,
)
assert response.status_code == 302
response = client.post(
"/login", data=dict(username="test", password="incorrect_password")
"/login",
data=dict(username="test", password="incorrect_password"),
follow_redirects=False,
)
assert response.status_code == 400

Expand Down

0 comments on commit 06353ca

Please sign in to comment.