fix emojies

This commit is contained in:
Dobromir Popov
2025-11-22 21:46:35 +02:00
parent e541e16e7e
commit 9a06288911
37 changed files with 528 additions and 181 deletions

View File

@@ -14,7 +14,7 @@ try:
from api.rest_api import create_app
from caching.redis_manager import redis_manager
from utils.logging import get_logger, setup_logging
print("All imports successful")
print("All imports successful")
except ImportError as e:
print(f"✗ Import error: {e}")
sys.exit(1)
@@ -29,11 +29,11 @@ async def test_health_endpoints():
# Test Redis manager
await redis_manager.initialize()
ping_result = await redis_manager.ping()
print(f"Redis ping: {ping_result}")
print(f"Redis ping: {ping_result}")
# Test app creation
app = create_app()
print("FastAPI app created successfully")
print("FastAPI app created successfully")
# Test health endpoint logic
from api.response_formatter import ResponseFormatter
@@ -46,7 +46,7 @@ async def test_health_endpoints():
}
response = formatter.status_response(health_data)
print(f"Health response format: {type(response)}")
print(f"Health response format: {type(response)}")
return True
@@ -63,19 +63,19 @@ async def test_static_files():
index_path = os.path.join(static_path, "index.html")
if os.path.exists(static_path):
print(f"Static directory exists: {static_path}")
print(f"Static directory exists: {static_path}")
else:
print(f"✗ Static directory missing: {static_path}")
return False
if os.path.exists(index_path):
print(f"Index.html exists: {index_path}")
print(f"Index.html exists: {index_path}")
# Test reading the file
with open(index_path, 'r', encoding='utf-8') as f:
content = f.read()
if "COBY" in content:
print("Index.html contains COBY content")
print("Index.html contains COBY content")
else:
print("✗ Index.html missing COBY content")
return False
@@ -101,7 +101,7 @@ async def test_websocket_config():
host=config.api.host,
port=config.api.websocket_port
)
print(f"WebSocket server configured: {config.api.host}:{config.api.websocket_port}")
print(f"WebSocket server configured: {config.api.host}:{config.api.websocket_port}")
return True
@@ -139,13 +139,13 @@ async def main():
total = len(results)
for i, result in enumerate(results):
status = "PASS" if result else "FAIL"
status = "PASS" if result else "FAIL"
print(f" Test {i+1}: {status}")
print(f"\nOverall: {passed}/{total} tests passed")
if passed == total:
print("🎉 All tests passed! COBY system should work correctly.")
print("All tests passed! COBY system should work correctly.")
return 0
else:
print(" Some tests failed. Please check the issues above.")