MCPcopy Create free account
hub / github.com/PromtEngineer/localGPT / main

Function main

backend/test_backend.py:124–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122 return False
123
124def 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
152if __name__ == "__main__":
153 main()

Callers 1

test_backend.pyFile · 0.70

Calls 3

test_health_endpointFunction · 0.85
test_chat_endpointFunction · 0.85

Tested by

no test coverage detected