diff --git a/tests/storage/business/test_raw_study_service.py b/tests/storage/business/test_raw_study_service.py index 2b5c4b2dfd..12914c52d5 100644 --- a/tests/storage/business/test_raw_study_service.py +++ b/tests/storage/business/test_raw_study_service.py @@ -75,7 +75,7 @@ def test_get(tmp_path: str, project_path) -> None: assert output == data - study.get.assert_called_once_with(["settings"], depth=2, formatted=True) + study.get.assert_called_once_with(["settings"], depth=2, format="json") @pytest.mark.unit_test diff --git a/tests/storage/business/test_variant_study_service.py b/tests/storage/business/test_variant_study_service.py index 7c6e00f99c..53182ce3ee 100644 --- a/tests/storage/business/test_variant_study_service.py +++ b/tests/storage/business/test_variant_study_service.py @@ -101,7 +101,7 @@ def task_status(*args): assert output == data - study.get.assert_called_once_with(["settings"], depth=2, formatted=True) + study.get.assert_called_once_with(["settings"], depth=2, format="json") @pytest.mark.unit_test diff --git a/tests/storage/integration/test_STA_mini.py b/tests/storage/integration/test_STA_mini.py index c7ce7c03f1..60f41b01c5 100644 --- a/tests/storage/integration/test_STA_mini.py +++ b/tests/storage/integration/test_STA_mini.py @@ -52,12 +52,12 @@ def assert_with_errors( storage_service: StudyService, url: str, expected_output: Union[str, dict], - formatted: bool = True, + format: str = "json", ) -> None: url = url[len("/v1/studies/") :] uuid, url = url.split("/raw?path=") params = RequestParameters(user=ADMIN) - output = storage_service.get(uuid=uuid, url=url, depth=3, formatted=formatted, params=params) + output = storage_service.get(uuid=uuid, url=url, depth=3, format=format, params=params) assert_study( output, expected_output, diff --git a/tests/storage/integration/test_write_STA_mini.py b/tests/storage/integration/test_write_STA_mini.py index 4ebb924753..c5cefee8bf 100644 --- a/tests/storage/integration/test_write_STA_mini.py +++ b/tests/storage/integration/test_write_STA_mini.py @@ -28,7 +28,7 @@ def assert_with_errors( res = storage_service.edit_study(uuid=uuid, url=url, new=new, params=params) assert res == new - res = storage_service.get(uuid=uuid, url=url, depth=-1, formatted=True, params=params) + res = storage_service.get(uuid=uuid, url=url, depth=-1, format="json", params=params) if expected is not None: assert res == expected else: diff --git a/tests/storage/web/test_studies_bp.py b/tests/storage/web/test_studies_bp.py index 05366331ca..11fbe8e38f 100644 --- a/tests/storage/web/test_studies_bp.py +++ b/tests/storage/web/test_studies_bp.py @@ -72,9 +72,7 @@ def test_server() -> None: client = TestClient(app) client.get("/v1/studies/study1/raw?path=settings/general/params") - mock_service.get.assert_called_once_with( - "study1", "settings/general/params", depth=3, formatted=True, params=PARAMS - ) + mock_service.get.assert_called_once_with("study1", "settings/general/params", depth=3, format="json", params=PARAMS) @pytest.mark.unit_test @@ -123,7 +121,7 @@ def test_server_with_parameters() -> None: parameters = RequestParameters(user=ADMIN) assert result.status_code == HTTPStatus.OK - mock_storage_service.get.assert_called_once_with("study1", "/", depth=4, formatted=True, params=parameters) + mock_storage_service.get.assert_called_once_with("study1", "/", depth=4, format="json", params=parameters) result = client.get("/v1/studies/study2/raw?depth=WRONG_TYPE") assert result.status_code == HTTPStatus.UNPROCESSABLE_ENTITY @@ -132,7 +130,7 @@ def test_server_with_parameters() -> None: assert result.status_code == HTTPStatus.OK excepted_parameters = RequestParameters(user=ADMIN) - mock_storage_service.get.assert_called_with("study2", "/", depth=3, formatted=True, params=excepted_parameters) + mock_storage_service.get.assert_called_with("study2", "/", depth=3, format="json", params=excepted_parameters) @pytest.mark.unit_test