From f00404e30ac44f2252577e8328b75cf1dfcec17d Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Sun, 8 Feb 2026 00:15:30 -0300 Subject: [PATCH] Change test imports to use package-level API Import from `from leakix import ...` instead of internal modules like `from leakix.field import ...`. This validates that __init__.py correctly re-exports the public API. Closes #38 --- tests/test_client.py | 15 ++++++++++----- tests/test_query.py | 16 +++++++--------- tests/test_response.py | 2 +- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/tests/test_client.py b/tests/test_client.py index d72b8d8..5fe3352 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -4,11 +4,16 @@ import pytest import requests_mock -from leakix import Client -from leakix.client import Scope -from leakix.field import CountryField, PluginField, PortField -from leakix.plugin import Plugin -from leakix.query import MustQuery, RawQuery +from leakix import ( + Client, + CountryField, + MustQuery, + Plugin, + PluginField, + PortField, + RawQuery, + Scope, +) RESULTS_DIR = Path(__file__).parent / "results" HOSTS_RESULTS_DIR = RESULTS_DIR / "host" diff --git a/tests/test_query.py b/tests/test_query.py index 7297d77..ae6e8a3 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -2,24 +2,22 @@ import pytest -from leakix.field import ( +from leakix import ( AgeField, CountryField, CustomField, + EmptyQuery, IPField, + MustNotQuery, + MustQuery, Operator, + Plugin, PluginField, PortField, - TimeField, - UpdateDateField, -) -from leakix.plugin import Plugin -from leakix.query import ( - EmptyQuery, - MustNotQuery, - MustQuery, RawQuery, ShouldQuery, + TimeField, + UpdateDateField, ) diff --git a/tests/test_response.py b/tests/test_response.py index fef37f3..9fb34ea 100644 --- a/tests/test_response.py +++ b/tests/test_response.py @@ -1,6 +1,6 @@ from unittest.mock import Mock -from leakix.response import ( +from leakix import ( ErrorResponse, RateLimitResponse, SuccessResponse,