Skip to content

Commit c07c4f8

Browse files
committed
migration
1 parent 9f64cf1 commit c07c4f8

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

services/storage/tests/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,12 @@ def app_settings(
174174
monkeypatch.delenv("S3_ENDPOINT")
175175
setenvs_from_dict(
176176
monkeypatch,
177-
s3_settings.dict(exclude={"S3_ENDPOINT"}),
177+
s3_settings.model_dump(exclude={"S3_ENDPOINT"}),
178178
)
179179
else:
180180
setenvs_from_dict(
181181
monkeypatch,
182-
s3_settings.dict(),
182+
s3_settings.model_dump(),
183183
)
184184
test_app_settings = Settings.create_from_envs()
185185
print(f"{test_app_settings.model_dump_json(indent=2)=}")
@@ -463,7 +463,7 @@ async def _directory_creator(dir_name: str):
463463

464464
directory_file_id = create_simcore_file_id(project_id, node_id, dir_name)
465465
directory_file_upload: FileUploadSchema = await create_upload_file_link_v2(
466-
directory_file_id, link_type="s3", is_directory="true", file_size=-1
466+
directory_file_id, link_type="s3", is_directory="true", file_size=0
467467
)
468468
# always returns a v2 link when dealing with directories
469469
assert isinstance(directory_file_upload, FileUploadSchema)

services/storage/tests/unit/test_dsm_dsmcleaner.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# pylint: disable=redefined-outer-name
44
# pylint: disable=too-many-arguments
55
# pylint: disable=too-many-branches
6-
# pylint: disable=too-many-positional-arguments
76
# pylint: disable=unused-argument
87
# pylint: disable=unused-variable
98

@@ -48,7 +47,7 @@ def disabled_dsm_cleaner_task(monkeypatch: pytest.MonkeyPatch):
4847
@pytest.fixture
4948
def simcore_directory_id(simcore_file_id: SimcoreS3FileID) -> SimcoreS3FileID:
5049
return TypeAdapter(SimcoreS3FileID).validate_python(
51-
Path(SimcoreS3DirectoryID.from_simcore_s3_object(simcore_file_id))
50+
SimcoreS3DirectoryID.from_simcore_s3_object(simcore_file_id)
5251
)
5352

5453

@@ -298,7 +297,7 @@ async def test_clean_expired_uploads_reverts_to_last_known_version_expired_pendi
298297
# check the entries were reverted
299298
async with aiopg_engine.acquire() as conn:
300299
reverted_fmd = await db_file_meta_data.get(conn, file_id)
301-
assert original_fmd.dict(exclude={"created_at"}) == reverted_fmd.dict(
300+
assert original_fmd.model_dump(exclude={"created_at"}) == reverted_fmd.model_dump(
302301
exclude={"created_at"}
303302
)
304303
# check the S3 content is the old file

0 commit comments

Comments
 (0)