Reformat with ruff

This commit is contained in:
Max Chis 2025-12-03 19:16:10 -05:00
parent 8ac7263f30
commit 2e6fd31045
1 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,5 @@
"""Tests for initialization of FastAPI app instance."""
import pytest
from fastapi import FastAPI
@ -9,11 +10,13 @@ def test_open_api_url_no_title():
with pytest.raises(ValueError):
FastAPI(openapi_url="/openapi.json", title=None)
def test_open_api_url_no_version():
"""An error should be raised if an openapi URL is provided without a version."""
with pytest.raises(ValueError):
FastAPI(openapi_url="/openapi.json", version=None)
def test_open_api_url_title_and_version():
"""No error should be raised if an openapi URL is provided with a title and version."""
FastAPI(openapi_url="/openapi.json", title="Title", version="0.1")