Skip to content

Commit 8d4cc14

Browse files
fix(client): mock data loading when imported
1 parent dc54d4f commit 8d4cc14

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/brave_search_python_client/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ def _load_mock_data(self, search_type: SearchType):
117117
import importlib.resources
118118

119119
# Get package root directory
120-
package_root = pathlib.Path(__file__).parent.parent
121-
mock_path = package_root / "tests/mock_data" / f"{search_type}.json"
120+
package_root = pathlib.Path(__file__).parent.parent.parent
121+
mock_path = package_root / MOCK_DATA_PATH / f"{search_type}.json"
122122

123123
with open(mock_path) as f:
124124
return json.load(f)

0 commit comments

Comments
 (0)