21 lines
635 B
Python
21 lines
635 B
Python
#!/usr/bin/env python3
|
|
|
|
import requests
|
|
import json
|
|
|
|
# Test the images API
|
|
def test_images_api():
|
|
base_url = "http://localhost:8000"
|
|
|
|
# First, let's check if we need to bootstrap or if there are existing API keys
|
|
try:
|
|
# Try to get images without API key first to see the error
|
|
response = requests.get(f"{base_url}/api/v1/images")
|
|
print(f"Images API without auth: {response.status_code}")
|
|
print(f"Response: {response.text[:200]}...")
|
|
|
|
except Exception as e:
|
|
print(f"Error testing images API: {e}")
|
|
|
|
if __name__ == "__main__":
|
|
test_images_api() |