diff --git a/tests/diag_edges_for_note.py b/tests/diag_edges_for_note.py index 8aa2494..65d0143 100644 --- a/tests/diag_edges_for_note.py +++ b/tests/diag_edges_for_note.py @@ -23,9 +23,19 @@ Ziel: from __future__ import annotations import argparse +import os +import sys from typing import List -from qdrant_client.http import models as rest +# Projekt-Root (Ordner mit "app/") zum sys.path hinzufügen, +# damit "import app.core.qdrant" funktioniert, auch wenn das Script +# direkt aus tests/ gestartet wird. +THIS_DIR = os.path.dirname(os.path.abspath(__file__)) +PROJECT_ROOT = os.path.dirname(THIS_DIR) +if PROJECT_ROOT not in sys.path: + sys.path.insert(0, PROJECT_ROOT) + +from qdrant_client.http import models as rest # type: ignore from app.core.qdrant import QdrantConfig, get_client, collection_names