Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions gsast-core/tests/test_config_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
Loading