feat: Update documentation and API for face identification and people management
This commit enhances the README with detailed instructions on the automatic database initialization and schema compatibility between the web and desktop versions. It also introduces new API endpoints for managing unidentified faces and people, including listing, creating, and identifying faces. The schemas for these operations have been updated to reflect the new data structures. Additionally, tests have been added to ensure the functionality of the new API features, improving overall coverage and reliability.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from src.web.app import app
|
||||
|
||||
|
||||
client = TestClient(app)
|
||||
|
||||
|
||||
def test_people_list_empty():
|
||||
res = client.get('/api/v1/people')
|
||||
assert res.status_code == 200
|
||||
data = res.json()
|
||||
assert 'items' in data and isinstance(data['items'], list)
|
||||
|
||||
|
||||
def test_unidentified_faces_empty():
|
||||
res = client.get('/api/v1/faces/unidentified')
|
||||
assert res.status_code == 200
|
||||
data = res.json()
|
||||
assert data['total'] >= 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user