Spaces:
Runtime error
Runtime error
| #!/usr/bin/env python3 | |
| """ | |
| Test script to verify FastAPI application logic | |
| This simulates what the FastAPI app should return | |
| """ | |
| def greet_json(): | |
| """Simulates the FastAPI endpoint""" | |
| return {"Hello": "World!"} | |
| # Test the function | |
| print("Testing FastAPI application logic...") | |
| print("-" * 40) | |
| result = greet_json() | |
| print(f"Result: {result}") | |
| # Verify the result | |
| expected = {"Hello": "World!"} | |
| assert result == expected, f"Expected {expected}, got {result}" | |
| print("✅ Test passed!") | |
| print("\nExpected output from / endpoint:") | |
| print(f" {result}") | |