Test that configurations load properly.
()
| 11 | sys.path.insert(0, str(project_root)) |
| 12 | |
| 13 | def test_config_loading(): |
| 14 | """Test that configurations load properly.""" |
| 15 | print("🔧 Testing configuration loading...") |
| 16 | |
| 17 | try: |
| 18 | from api.config import configs, CLIENT_CLASSES |
| 19 | |
| 20 | # Check if Google embedder config exists |
| 21 | if 'embedder_google' in configs: |
| 22 | print("✅ embedder_google configuration found") |
| 23 | google_config = configs['embedder_google'] |
| 24 | print(f"📋 Google config: {json.dumps(google_config, indent=2, default=str)}") |
| 25 | else: |
| 26 | print("❌ embedder_google configuration not found") |
| 27 | return False |
| 28 | |
| 29 | # Check if GoogleEmbedderClient is in CLIENT_CLASSES |
| 30 | if 'GoogleEmbedderClient' in CLIENT_CLASSES: |
| 31 | print("✅ GoogleEmbedderClient found in CLIENT_CLASSES") |
| 32 | else: |
| 33 | print("❌ GoogleEmbedderClient not found in CLIENT_CLASSES") |
| 34 | return False |
| 35 | |
| 36 | return True |
| 37 | |
| 38 | except Exception as e: |
| 39 | print(f"❌ Error loading configuration: {e}") |
| 40 | import traceback |
| 41 | traceback.print_exc() |
| 42 | return False |
| 43 | |
| 44 | def test_embedder_selection(): |
| 45 | """Test embedder selection mechanism.""" |
nothing calls this directly
no outgoing calls
no test coverage detected