2026.03.29 20:00 Gitea_manager javítás előtt

This commit is contained in:
Roo
2026-03-29 17:59:06 +00:00
parent 03258db091
commit ba8b6579ef
148 changed files with 7951 additions and 591 deletions

29
test_registration_smtp.py Normal file
View File

@@ -0,0 +1,29 @@
import urllib.request
import urllib.error
import json
import time
email = f"smtp_tester_{int(time.time())}@example.com"
url = "http://localhost:8000/api/v1/auth/register"
payload = {
"email": email,
"password": "TestPassword123!",
"first_name": "Test",
"last_name": "SMTP",
"region_code": "HU",
"lang": "hu"
}
data = json.dumps(payload).encode('utf-8')
req = urllib.request.Request(url, data=data, headers={'Content-Type': 'application/json'})
try:
print(f"Registering: {email}")
resp = urllib.request.urlopen(req, timeout=20.0)
print(f"Status: {resp.status}")
print(f"Response: {resp.read().decode('utf-8')}")
except urllib.error.HTTPError as e:
print(f"HTTPError: {e.code}")
print(f"Response: {e.read().decode('utf-8')}")
except Exception as e:
print(f"Error: {e}")