- Sort Score
- Num 10 results
- Language All
Results 1 - 3 of 3 for TestClient (0.06 seconds)
-
tests/test_application.py
import pytest from fastapi.testclient import TestClient from inline_snapshot import snapshot from .main import app client = TestClient(app) @pytest.mark.parametrize( "path,expected_status,expected_response", [ ("/api_route", 200, {"message": "Hello World"}), ("/non_decorated_route", 200, {"message": "Hello World"}), ("/nonexistent", 404, {"detail": "Not Found"}), ], )
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 56.9K bytes - Click Count (0) -
tests/test_response_model_as_return_annotation.py
import pytest from fastapi import FastAPI from fastapi.exceptions import FastAPIError, ResponseValidationError from fastapi.responses import JSONResponse, Response from fastapi.testclient import TestClient from inline_snapshot import snapshot from pydantic import BaseModel class BaseUser(BaseModel): name: str class User(BaseUser): surname: str class DBUser(User): password_hash: str
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 50.3K bytes - Click Count (0) -
tests/test_generate_unique_id_function.py
import warnings from fastapi import APIRouter, FastAPI from fastapi.routing import APIRoute from fastapi.testclient import TestClient from inline_snapshot import snapshot from pydantic import BaseModel def custom_generate_unique_id(route: APIRoute): return f"foo_{route.name}" def custom_generate_unique_id2(route: APIRoute): return f"bar_{route.name}" def custom_generate_unique_id3(route: APIRoute):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 75K bytes - Click Count (0)