Skip to content

Commit

Permalink
fix(client): mock data loading when imported
Browse files Browse the repository at this point in the history
  • Loading branch information
helmut-hoffer-von-ankershoffen committed Jan 1, 2025
1 parent dc54d4f commit 8d4cc14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/brave_search_python_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ def _load_mock_data(self, search_type: SearchType):
import importlib.resources

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

with open(mock_path) as f:
return json.load(f)
Expand Down

0 comments on commit 8d4cc14

Please sign in to comment.