feat: pagination totals, request logging, data retention
Add shared paginate() helper with total count to all list endpoints. Add request logging middleware (method, path, status, duration, IP). Add data retention service with configurable thresholds and CLI command.
This commit is contained in:
@@ -8,7 +8,10 @@ def test_list_sensors_empty(client):
|
||||
"""Test listing sensors when empty."""
|
||||
response = client.get('/api/v1/sensors')
|
||||
assert response.status_code == 200
|
||||
assert response.json == {'sensors': []}
|
||||
assert response.json['sensors'] == []
|
||||
assert response.json['total'] == 0
|
||||
assert response.json['limit'] == 100
|
||||
assert response.json['offset'] == 0
|
||||
|
||||
|
||||
def test_get_sensor_not_found(client):
|
||||
|
||||
Reference in New Issue
Block a user