import requests

BASE_URL = "http://127.0.0.1:8001"

# Create session to get token
r = requests.post(f"{BASE_URL}/auth/token", data={"username": "admin@shop.com", "password": "admin123"})
if r.status_code != 200:
    print(f"Login failed: {r.status_code} {r.text}")
    exit()

token = r.json()["access_token"]
headers = {"Authorization": f"Bearer {token}"}

# Try to delete product with ID 1
r = requests.delete(f"{BASE_URL}/products/1", headers=headers)
print(f"Status: {r.status_code}")
print(f"Response Body: {r.text}")
