We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70bc174 commit 6015f90Copy full SHA for 6015f90
test/backend/app/test_image_app.py
@@ -3,8 +3,10 @@
3
import pytest
4
from unittest.mock import patch, MagicMock, AsyncMock
5
6
-# Add the project root directory to sys.path
7
-sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../../..')))
+# Dynamically determine the backend path
+current_dir = os.path.dirname(os.path.abspath(__file__))
8
+backend_dir = os.path.abspath(os.path.join(current_dir, "../../../backend"))
9
+sys.path.append(backend_dir)
10
11
# Mock the consts.const module before importing the image_app module
12
mock_const = MagicMock()
0 commit comments