import httpx import asyncio API_URL = "https://api-software-undso.z5m7q9dk3ah2v1plx6ju.com" API_KEY = "test-api-key-12345" async def test_license_server(): async with httpx.AsyncClient(verify=False) as client: # Test root endpoint print("Testing root endpoint...") response = await client.get(f"{API_URL}/") print(f"Status: {response.status_code}") print(f"Response: {response.json()}\n") # Test health endpoint print("Testing health endpoint...") response = await client.get(f"{API_URL}/health") print(f"Status: {response.status_code}") print(f"Response: {response.json()}\n") # Test license activation (will fail without valid API key) print("Testing license activation...") headers = {"Authorization": f"Bearer {API_KEY}"} data = { "license_key": "TEST-LICENSE-KEY-12345", "machine_id": "MACHINE001", "hardware_hash": "abc123def456", "app_version": "1.0.0" } response = await client.post( f"{API_URL}/api/license/activate", headers=headers, json=data ) print(f"Status: {response.status_code}") print(f"Response: {response.json()}\n") if __name__ == "__main__": asyncio.run(test_license_server())