()
| 122 | return False |
| 123 | |
| 124 | def main(): |
| 125 | print("🧪 Testing localGPT Backend") |
| 126 | print("=" * 40) |
| 127 | |
| 128 | # Test health endpoint |
| 129 | health_ok = test_health_endpoint() |
| 130 | if not health_ok: |
| 131 | print("\n❌ Backend server is not running or not healthy") |
| 132 | print(" Make sure to run: python server.py") |
| 133 | return |
| 134 | |
| 135 | # Test basic chat |
| 136 | chat_ok = test_chat_endpoint() |
| 137 | if not chat_ok: |
| 138 | print("\n❌ Chat functionality is not working") |
| 139 | return |
| 140 | |
| 141 | # Test conversation history |
| 142 | conversation_ok = test_conversation_history() |
| 143 | |
| 144 | print("\n" + "=" * 40) |
| 145 | if health_ok and chat_ok and conversation_ok: |
| 146 | print("🎉 All tests passed! Backend is ready for frontend integration.") |
| 147 | else: |
| 148 | print("⚠️ Some tests failed. Check the issues above.") |
| 149 | |
| 150 | print("\n🔗 Ready to connect to frontend at http://localhost:3000") |
| 151 | |
| 152 | if __name__ == "__main__": |
| 153 | main() |
no test coverage detected