Skip to content

Commit

Permalink
python: Add basic openapi.json fetching test (#1647)
Browse files Browse the repository at this point in the history
  • Loading branch information
svix-jplatte authored Jan 22, 2025
2 parents 4064cf7 + 75fcc25 commit 9acb5e5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
8 changes: 6 additions & 2 deletions python/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# This file is autogenerated by pip-compile with Python 3.13
# by the following command:
#
# pip-compile --output-file=requirements-dev.txt requirements.in/development.txt
Expand Down Expand Up @@ -109,13 +109,17 @@ sniffio==1.3.1
# httpx
typer==0.9.4
# via openapi-python-client
types-requests==2.32.0.20241016
# via -r requirements.in/development.txt
typing-extensions==4.12.2
# via
# mypy
# pydantic
# typer
urllib3==2.2.3
# via requests
# via
# requests
# types-requests
werkzeug==3.0.4
# via pytest-httpserver
wheel==0.44.0
Expand Down
1 change: 1 addition & 0 deletions python/requirements.in/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ jinja2>=3.1.3
pytest-docker
pytest-httpserver
requests
types-requests
6 changes: 6 additions & 0 deletions python/tests/test_openapi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import requests

def test_openapi_json_is_available(svix_server_url: str) -> None:
r = requests.get(f"{svix_server_url}/api/v1/openapi.json")
assert r.status_code == 200
assert r.headers["content-type"] == 'application/json'

0 comments on commit 9acb5e5

Please sign in to comment.