Skip to content

Commit

Permalink
tests: only run schema tests on < 0.86.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasKs committed Nov 10, 2022
1 parent 66ad9de commit ec6014a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.8.15", "3.9.15", "3.10.8", "3.11.0" ]
fastapi-version: [ "0.68.0", "0.70.0", "0.71.0" ]
python-version: [ "3.8.13", "3.9.15", "3.10.8", "3.11.0" ]
fastapi-version: [ "0.68.0", "0.70.0", "0.71.0", "0.86.0"]
steps:
- name: Check out repository
uses: actions/checkout@v3
Expand Down
2 changes: 2 additions & 0 deletions tests/test_openapi_scheme.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import fastapi
import pytest
from demo_project.main import app
from fastapi.testclient import TestClient
Expand Down Expand Up @@ -203,6 +204,7 @@ def test_client():
yield TestClient(app=app)


@pytest.mark.skipif(fastapi.__version__ < ('0.86.0'), reason='Different schema in older version')
def test_openapi_schema(test_client):
response = test_client.get('api/v1/openapi.json')
assert response.status_code == 200, response.text
Expand Down

0 comments on commit ec6014a

Please sign in to comment.