Skip to content

Commit

Permalink
fix json escaping on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshalX committed Oct 25, 2023
1 parent 12e26a6 commit e770e18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/cyclient/mocked_responses/data/detections.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"branch_name": "",
"committer_name": "",
"committed_at": "0001-01-01T00:00:00+00:00",
"file_path": "{%FILEPATH%}",
"file_path": "%FILEPATH%",
"file_name": "secrets.py",
"file_extension": ".py",
"url": null,
Expand All @@ -43,7 +43,7 @@
"remediable": false,
"correlation_message": "Secret of type 'Slack Token' was found in filename 'secrets.py' within '' repository",
"provider": "CycodeCli",
"scan_id": "{%SCAN_ID%}",
"scan_id": "%SCAN_ID%",
"assignee_id": null,
"type": "slack-token",
"is_hidden": false,
Expand Down
4 changes: 2 additions & 2 deletions tests/cyclient/mocked_responses/scan_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ def get_scan_detections_url(scan_client: ScanClient) -> str:
def get_scan_detections_response(url: str, scan_id: UUID, zip_content_path: Path) -> responses.Response:
with open(MOCKED_RESPONSES_PATH.joinpath('detections.json')) as f:
content = f.read()
content = content.replace('{%FILEPATH%}', str(zip_content_path.absolute()))
content = content.replace('{%SCAN_ID%}', str(scan_id))
content = content.replace('%FILEPATH%', str(zip_content_path.absolute()))
content = content.replace('%SCAN_ID%', str(scan_id))

json_response = json.loads(content)

Expand Down

0 comments on commit e770e18

Please sign in to comment.