Files
ksef_app/tests/test_api.py
Mateusz Gruszczyński 35571df778 push
2026-03-13 11:03:13 +01:00

18 lines
516 B
Python

from app.models.company import Company
from app.services.sync_service import SyncService
def test_health(client):
response = client.get('/api/health')
assert response.status_code == 200
assert response.json['db'] == 'ok'
def test_api_invoices(auth_client, app):
with app.app_context():
company = Company.query.first()
SyncService(company).run_manual_sync()
response = auth_client.get('/api/invoices')
assert response.status_code == 200
assert 'items' in response.json