File size: 1,219 Bytes
ab028ac
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python3
"""
Test the PDF generation API endpoints.
"""

import requests
import json
import os

# Test the application endpoints
BASE_URL = "http://127.0.0.1:5000"

def test_api_endpoints():
    """Test the PDF generation endpoints."""
    
    # First, check if the app is running
    try:
        response = requests.get(f"{BASE_URL}/")
        if response.status_code == 200:
            print("✓ Flask app is running")
        else:
            print("✗ Flask app is not responding properly")
            return
    except:
        print("✗ Flask app is not running. Please start it with 'python app.py'")
        return
    
    # Test data - you'll need to be logged in first
    print("\nTo test the PDF generation endpoints:")
    print("1. Go to http://127.0.0.1:5000 and sign up/login")
    print("2. Create a profile with some data")
    print("3. Try generating PDF resumes from the profile page")
    
    # The actual endpoints that will be called:
    print("\nPDF generation endpoints:")
    print("- POST /profile/generate-pdf/standard")
    print("- POST /profile/generate-pdf/modern")
    print("- POST /profile/generate-word")

if __name__ == "__main__":
    test_api_endpoints()