"""
    encoding: UTF-8
    @author:clx
    @file:test_unit.py
    @time:2023/5/30 20:06
"""
import uvicorn
from fastapi import FastAPI
from fastapi.testclient import TestClient
import pytest

app = FastAPI()

client = TestClient(app)


def test_create_file():
    response = client.get("/item/res")
    assert response.status_code == 200
    assert response.json() == [
    {"id": 1, "name": "jack"},
    {"id": 2, "name": "mark"},
    {"id": 3, "name": "tom"},
    {"id": 4, "name": "sery"}
]