Skip to content

Commit f24d057

Browse files
committed
Fix method mock
1 parent 15d5380 commit f24d057

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/conftest.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import concurrent
66
import copy
7-
import functools
87
import logging
98
import os
109
import pathlib
@@ -262,7 +261,7 @@ def _mock_fetch_dataframe(
262261
code_list_csv_filepath_nn: pathlib.Path,
263262
code_list_csv_filepath_en: pathlib.Path,
264263
) -> None:
265-
def fake_code_list() -> dict[str, pd.DataFrame]:
264+
def fake_code_list(_self: Any) -> dict[str, pd.DataFrame]: # noqa: ANN401
266265
return {
267266
"nb": pd.read_csv(code_list_csv_filepath_nb, converters={"code": str}),
268267
"nn": pd.read_csv(code_list_csv_filepath_nn, converters={"code": str}),
@@ -272,7 +271,7 @@ def fake_code_list() -> dict[str, pd.DataFrame]:
272271
mocker.patch(
273272
DATADOC_METADATA_MODULE
274273
+ ".code_list.CodeList._fetch_data_from_external_source",
275-
functools.partial(fake_code_list),
274+
fake_code_list,
276275
)
277276

278277

0 commit comments

Comments
 (0)