Skip to content

Commit

Permalink
chore: clean test warnings (#308)
Browse files Browse the repository at this point in the history
* chore: clean test warnings

Signed-off-by: Keming <[email protected]>

* make it compatible with py37

Signed-off-by: Keming <[email protected]>

* deprecate 3.7 test

Signed-off-by: Keming <[email protected]>

---------

Signed-off-by: Keming <[email protected]>
  • Loading branch information
kemingy committed May 3, 2023
1 parent 65d8c1f commit 0508b70
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
runs-on: ${{ matrix.os }}
needs: [lint]
strategy:
max-parallel: 6
max-parallel: 5
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3.7"]
python-version: ["3.8", "3.9", "3.10", "3.11", "pypy3.8"]
os: [ubuntu-latest]

steps:
Expand Down
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dynamic = []
description = "generate OpenAPI document and validate request&response with Python annotations."
readme = "README.md"
license = {text = "Apache-2.0"}
requires-python = ">=3.6"
requires-python = ">=3.8"
authors = [
{ name = "Keming Yang", email = "[email protected]" },
]
Expand All @@ -14,8 +14,6 @@ classifiers = [
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down
6 changes: 3 additions & 3 deletions tests/flask_imports/dry_plugin_flask.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


def test_flask_skip_validation(client):
client.set_cookie("flask", "pub", "abcdefg")
client.set_cookie(key="pub", value="abcdefg")

resp = client.post(
"/api/user_skip/flask?order=1",
Expand All @@ -19,7 +19,7 @@ def test_flask_skip_validation(client):


def test_flask_return_model(client):
client.set_cookie("flask", "pub", "abcdefg")
client.set_cookie(key="pub", value="abcdefg")

resp = client.post(
"/api/user_model/flask?order=1",
Expand Down Expand Up @@ -121,7 +121,7 @@ def test_flask_validate_basic(client):
],
)
def test_flask_validate_post_data(client, fragment):
client.set_cookie("flask", "pub", "abcdefg")
client.set_cookie(key="pub", value="abcdefg")
resp = client.post(
f"/api/{fragment}/flask?order=1",
json=dict(name="flask", limit=10),
Expand Down
1 change: 0 additions & 1 deletion tests/test_plugin_flask_blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ def ping():

with flask_app.app_context():
api.spec
api.register(app)

with flask_app.test_client() as test_client:
yield test_client, api
Expand Down
3 changes: 2 additions & 1 deletion tests/test_plugin_starlette.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ async def list_json(request):


def inner_register_func():
@app.route("/api/user/{name}/address/{address_id}")
@api.validate(
query=Query,
path_parameter_descriptions={
Expand All @@ -194,6 +193,8 @@ def inner_register_func():
def user_address(request):
return None

app.routes.append(Route("/api/user/{name}/address/{address_id}", user_address))


inner_register_func()
api.register(app)
Expand Down

0 comments on commit 0508b70

Please sign in to comment.