Fix: Rettet test-economic endpoint - fjernet ikke-eksisterende get_self() kald

This commit is contained in:
Christian 2025-12-22 11:17:36 +01:00
parent 7fd596612c
commit 41f7ae991c

View File

@ -53,12 +53,9 @@ async def test_economic_connection():
from app.services.economic_service import EconomicService
economic = EconomicService()
# Test 1: Fetch first page of customers
# Test: Fetch first page of customers
customers = await economic.get_customers(page=0, page_size=5)
# Test 2: Get self info
self_info = await economic.get_self()
return {
"status": "success",
"connection": "healthy",
@ -67,13 +64,9 @@ async def test_economic_connection():
"has_agreement_token": bool(settings.ECONOMIC_AGREEMENT_GRANT_TOKEN),
"read_only_mode": settings.ECONOMIC_READ_ONLY,
"dry_run_mode": settings.ECONOMIC_DRY_RUN,
"self_info": {
"agreement": self_info.get("agreementNumber") if self_info else None,
"company": self_info.get("company", {}).get("name") if self_info else None
},
"sample_customers": {
"count": len(customers) if customers else 0,
"first_3": [
"test_results": {
"customers_fetched": len(customers) if customers else 0,
"sample_customers": [
{
"number": c.get("customerNumber"),
"name": c.get("name"),