Fix: Rettet test-economic endpoint - fjernet ikke-eksisterende get_self() kald
This commit is contained in:
parent
7fd596612c
commit
41f7ae991c
@ -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"),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user