From 57bb0f52430425adcc51d531d8276c4cf638aed1 Mon Sep 17 00:00:00 2001 From: davidus27 Date: Mon, 20 Apr 2026 18:15:54 +0200 Subject: [PATCH] update path to the test --- gsast-core/tests/test_config_models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gsast-core/tests/test_config_models.py b/gsast-core/tests/test_config_models.py index f73dbcf..f83c1f8 100644 --- a/gsast-core/tests/test_config_models.py +++ b/gsast-core/tests/test_config_models.py @@ -449,7 +449,7 @@ class TestIntegrationWithExistingConfigs: def test_parse_existing_github_config(self): """Test parsing the existing gsast-GitHub.json file.""" - github_json_path = Path("tests/mock/test-github.json") + github_json_path = Path(__file__).parent / "mock" / "test-github.json" # Load and parse the existing config config = GSASTConfig.from_json_file(github_json_path) @@ -473,7 +473,7 @@ def test_parse_existing_github_config(self): def test_parse_existing_gitlab_config(self): """Test parsing the existing gsast-GitLab.json file.""" - gitlab_json_path = Path("tests/mock/test-gitlab.json") + gitlab_json_path = Path(__file__).parent / "mock" / "test-gitlab.json" # Load and parse the existing config config = GSASTConfig.from_json_file(gitlab_json_path) @@ -495,7 +495,8 @@ def test_parse_existing_gitlab_config(self): def test_roundtrip_existing_configs(self): """Test that existing configs can be parsed and converted back to equivalent dict.""" - for config_file in ["tests/mock/test-github.json", "tests/mock/test-gitlab.json"]: + mock_dir = Path(__file__).parent / "mock" + for config_file in [mock_dir / "test-github.json", mock_dir / "test-gitlab.json"]: # Load original with open(config_file, 'r') as f: original_data = json.load(f)