Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /GRID-INTELLIGENCE_GRID /dev /debug /debug_nav_test.py
| import os | |
| import sys | |
| sys.path.append(os.getcwd()) | |
| from fastapi.testclient import TestClient | |
| from application.mothership.main import create_app | |
| from application.mothership.security.jwt import reset_jwt_manager | |
| def debug_test(): | |
| reset_jwt_manager() | |
| app = create_app() | |
| client = TestClient(app) | |
| # Authenticate | |
| login_res = client.post( | |
| "/api/v1/auth/login", | |
| json={ | |
| "username": "testuser", | |
| "password": "testpass", | |
| "scopes": ["read", "write"], | |
| }, | |
| ) | |
| if login_res.status_code != 200: | |
| print("Login failed:", login_res.json()) | |
| return | |
| tokens = login_res.json()["data"] | |
| # Navigation request | |
| response = client.post( | |
| "/api/v1/navigation/plan", | |
| headers={"Authorization": f"Bearer {tokens['access_token']}"}, | |
| json={ | |
| "goal": "Complete user onboarding", | |
| "context": {"user_type": "new"}, | |
| "max_alternatives": 3, | |
| }, | |
| ) | |
| print(f"Status: {response.status_code}") | |
| print(f"Response: {response.json()}") | |
| if __name__ == "__main__": | |
| debug_test() | |
Xet Storage Details
- Size:
- 1.13 kB
- Xet hash:
- aa0ee467c64805db5e02b5143a46a2eafb1c7cb7fecea80d75389dc8cfb51fee
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.