fix: correct API response parsing in workflow integration tests

- API returns {"vendors": [...]} not a direct list
- Update test to access vendors_response["vendors"] correctly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-14 12:49:14 +01:00
parent c7321cf0e0
commit da34529d4e

View File

@@ -47,8 +47,11 @@ class TestIntegrationFlows:
# 3. List all vendors
response = client.get("/api/v1/admin/vendors", headers=admin_headers)
assert response.status_code == 200
vendors = response.json()
assert any(v["vendor_code"] == vendor["vendor_code"] for v in vendors)
vendors_response = response.json()
assert any(
v["vendor_code"] == vendor["vendor_code"]
for v in vendors_response["vendors"]
)
def test_admin_product_listing_workflow(
self, client, admin_headers, test_marketplace_product