mcp / test_fixed_app.py
Tracy André
updated
d13ece1
raw
history blame
987 Bytes
"""
Test de l'application corrigée
"""
import os
from mcp_server import create_mcp_interface
# Hugging Face configuration
hf_token = os.environ.get("HF_TOKEN")
if hf_token:
os.environ["HF_TOKEN"] = hf_token
os.environ["DATASET_ID"] = "HackathonCRA/2024"
def test_fixed_app():
"""Test de l'application avec corrections ASGI"""
print("🧪 Test de l'application corrigée...")
try:
demo = create_mcp_interface()
print("✅ Interface créée avec succès")
# Test des fonctions wrapper
from mcp_server import mcp_registry
resources = mcp_registry.list_resources()
print(f"✅ {len(resources)} resources MCP enregistrées")
print("🎯 Application prête pour déploiement !")
return True
except Exception as e:
print(f"❌ Erreur: {e}")
import traceback
traceback.print_exc()
return False
if __name__ == "__main__":
test_fixed_app()