Files
service-finder/backend/test_registration.py

26 lines
676 B
Python

#!/usr/bin/env python3
import httpx
import json
def test_registration():
url = "http://localhost:8000/api/v1/auth/register"
payload = {
"email": "testuser@example.com",
"password": "TestPassword123",
"first_name": "Test",
"last_name": "User",
"region_code": "HU",
"lang": "hu"
}
try:
resp = httpx.post(url, json=payload, timeout=10.0)
print(f"Status: {resp.status_code}")
print(f"Response: {resp.text}")
return resp.status_code, resp.text
except Exception as e:
print(f"Error: {e}")
return None, str(e)
if __name__ == "__main__":
test_registration()