Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Anis SMAIL committed Jan 28, 2025
1 parent 31dc2b9 commit d1e2376
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 0 additions & 4 deletions antarest/study/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,6 @@ def __eq__(self, other: t.Any) -> bool:
def to_json_summary(self) -> t.Any:
return {"id": self.id, "name": self.name}

@validates("path")
def validate_email(self, key, path) -> str:
return normalize_path(path)

@validates("folder")
def validate_folder(self, key, folder) -> str:
return normalize_path(folder)
Expand Down
8 changes: 4 additions & 4 deletions tests/storage/business/test_raw_study_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,14 @@ def test_assert_study_not_exist(tmp_path: str, project_path) -> None:


@pytest.mark.unit_test
def test_create(tmp_path_posix: Path, project_path: Path) -> None:
def test_create(tmp_path: Path, project_path: Path) -> None:
study = Mock()
data = {"antares": {"caption": None}}
study.get.return_value = data

study_factory = Mock()
study_factory.create_from_fs.return_value = FileStudy(Mock(), study)
config = build_config(tmp_path_posix)
config = build_config(tmp_path)
study_service = RawStudyService(
config=config,
cache=Mock(),
Expand All @@ -233,8 +233,8 @@ def test_create(tmp_path_posix: Path, project_path: Path) -> None:
)
md = study_service.create(metadata)

assert md.path == str(tmp_path_posix / "study1")
path_study = tmp_path_posix / md.id
assert md.path == str(tmp_path / "study1")
path_study = tmp_path / md.id
path_stud_os_specifix = Path(path_study)
assert path_stud_os_specifix.exists()

Expand Down

0 comments on commit d1e2376

Please sign in to comment.