Skip to content

Commit f0e3a83

Browse files
committed
Enhance CORS test setup by adding project root to sys.path
- Introduced project root path to `sys.path` in `test_cors.py` to ensure proper module resolution during tests. - Updated imports to maintain compatibility with the new project structure.
1 parent 86efd58 commit f0e3a83

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

state-manager/tests/unit/config/test_cors.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
from unittest.mock import patch
22
import os
3+
import pathlib
4+
import sys
5+
6+
project_root = str(pathlib.Path(__file__).parent.parent.parent.parent)
7+
sys.path.insert(0, project_root)
38

49
from app.config.cors import get_cors_origins, get_cors_config
510

0 commit comments

Comments
 (0)