#!/usr/bin/env python3
import httpx
import json
import uuid

def test_registration():
    url = "http://localhost:8000/api/v1/auth/register"
    # Generate unique email
    unique_email = f"testuser_{uuid.uuid4().hex[:8]}@example.com"
    payload = {
        "email": unique_email,
        "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()