Skip to content

Commit 6dc9bb7

Browse files
committed
fix tests
1 parent 99ded71 commit 6dc9bb7

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

server/mergin/sync/public_api_controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ def push_finish(transaction_id):
972972
if len(unsupported_files):
973973
abort(
974974
400,
975-
f"Unsupported file type detected: {unsupported_files[0]}. "
975+
f"Unsupported file type detected: '{unsupported_files[0]}'. "
976976
f"Please remove the file or try compressing it into a ZIP file before uploading.",
977977
)
978978

server/mergin/tests/test_project_controller.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2495,7 +2495,7 @@ def test_filepath_manipulation(client):
24952495
assert resp.status_code == 400
24962496
assert (
24972497
resp.json["detail"]
2498-
== f"Unsupported file name detected: {manipulated_path}. Please remove the invalid characters."
2498+
== f"Unsupported file name detected: '{manipulated_path}'. Please remove the invalid characters."
24992499
)
25002500

25012501

@@ -2528,7 +2528,7 @@ def test_supported_file_upload(client):
25282528
assert resp.status_code == 400
25292529
assert (
25302530
resp.json["detail"]
2531-
== f"Unsupported file type detected: {script_filename}. Please remove the file or try compressing it into a ZIP file before uploading."
2531+
== f"Unsupported file type detected: '{script_filename}'. Please remove the file or try compressing it into a ZIP file before uploading."
25322532
)
25332533
# Extension spoofing to trick the validator
25342534
spoof_name = "script.gpkg"
@@ -2567,7 +2567,7 @@ def test_supported_file_upload(client):
25672567
assert resp.status_code == 400
25682568
assert (
25692569
resp.json["detail"]
2570-
== f"Unsupported file type detected: {spoof_name}. Please remove the file or try compressing it into a ZIP file before uploading."
2570+
== f"Unsupported file type detected: '{spoof_name}'. Please remove the file or try compressing it into a ZIP file before uploading."
25712571
)
25722572

25732573

0 commit comments

Comments
 (0)