fix pytest

This commit is contained in:
2024-12-04 14:44:32 +09:00
parent c5c4f79e4f
commit 4f17a6952d
6 changed files with 150 additions and 181 deletions

View File

@@ -1,11 +1,6 @@
import pytest
from fastapi.testclient import TestClient
from app.main import app
client = TestClient(app)
def test_read_main():
response = client.get("/api/v1")
def test_read_main(test_client):
response = test_client.get("/api/v1")
assert response.status_code == 200
assert response.json() == {"message": "Hello World"}
assert response.json() == {"message": "success"}