2026.03.30 front és garázs logika
This commit is contained in:
26
backend/app/tests/test_registration.py
Normal file
26
backend/app/tests/test_registration.py
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/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()
|
||||
Reference in New Issue
Block a user