Skip to content

Commit 3de04c7

Browse files
committed
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
1 parent ac6ec0a commit 3de04c7

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

tests/test_client.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44
import pytest
55
import requests_mock
66

7-
from leakix import Client
8-
from leakix.client import Scope
9-
from leakix.field import CountryField, PluginField, PortField
10-
from leakix.plugin import Plugin
11-
from leakix.query import MustQuery, RawQuery
7+
from leakix import (
8+
Client,
9+
CountryField,
10+
MustQuery,
11+
Plugin,
12+
PluginField,
13+
PortField,
14+
RawQuery,
15+
Scope,
16+
)
1217

1318
RESULTS_DIR = Path(__file__).parent / "results"
1419
HOSTS_RESULTS_DIR = RESULTS_DIR / "host"

tests/test_query.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,22 @@
22

33
import pytest
44

5-
from leakix.field import (
5+
from leakix import (
66
AgeField,
77
CountryField,
88
CustomField,
9+
EmptyQuery,
910
IPField,
11+
MustNotQuery,
12+
MustQuery,
1013
Operator,
14+
Plugin,
1115
PluginField,
1216
PortField,
13-
TimeField,
14-
UpdateDateField,
15-
)
16-
from leakix.plugin import Plugin
17-
from leakix.query import (
18-
EmptyQuery,
19-
MustNotQuery,
20-
MustQuery,
2117
RawQuery,
2218
ShouldQuery,
19+
TimeField,
20+
UpdateDateField,
2321
)
2422

2523

tests/test_response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from unittest.mock import Mock
22

3-
from leakix.response import (
3+
from leakix import (
44
ErrorResponse,
55
RateLimitResponse,
66
SuccessResponse,

0 commit comments

Comments
 (0)