"""Verify the campaign CSV export now shows real names + rendered subjects.""" import requests BASE = "http://localhost:8000" s = requests.Session() r = s.post(f"{BASE}/auth/login", json={"email": "tester@example.com", "password": "SuperSecret123!"}) print("login:", r.status_code) # CSRF if needed csrf = s.cookies.get("csrf_token") or s.cookies.get("csrftoken") r = s.get(f"{BASE}/campaigns/2/export") print("export:", r.status_code, r.headers.get("content-type")) lines = r.text.splitlines() print(f"rows: {len(lines)}") for ln in lines[:5]: print(" ", ln)