Spaces:
Running
Running
File size: 760 Bytes
afd56bc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | import sys
import os
sys.path.insert(0, os.path.abspath("backend"))
from fastapi.testclient import TestClient
from server import app
from core.subscription.middleware import verify_token
app.dependency_overrides[verify_token] = lambda: {"sub": "test_clerk_id_123"}
client = TestClient(app)
response = client.post(
"/api/projects",
json={
"title": "Nowy Projekt",
"description": "Jakiś długi opis...",
"program_type": "KPO",
"program_name": "KPO - Odporność",
"external_context": {
"company_data": {"name": "Test Sp. z o.o.", "status": "Zidentyfikowano"},
"resources": [],
"grant_amount": "do 70%",
},
},
)
print(response.status_code)
print(response.json())
|