diff --git a/tests/api_defs/__init__.py b/tests/api_defs/__init__.py new file mode 100644 index 0000000..8f8b527 --- /dev/null +++ b/tests/api_defs/__init__.py @@ -0,0 +1 @@ +from ..client import client diff --git a/tests/test_api_defs/test_server_stats.py b/tests/api_defs/test_server_stats.py similarity index 91% rename from tests/test_api_defs/test_server_stats.py rename to tests/api_defs/test_server_stats.py index 530b09b..c10e93f 100644 --- a/tests/test_api_defs/test_server_stats.py +++ b/tests/api_defs/test_server_stats.py @@ -1,11 +1,9 @@ import pytest -from vshieldpy.client import Client +from . import client pytestmark = pytest.mark.anyio -client = Client() - async def test_server_stats(): server_stats = await client.fetch_server_stats(1) diff --git a/tests/test_api_defs/test_stock_status.py b/tests/api_defs/test_stock_status.py similarity index 93% rename from tests/test_api_defs/test_stock_status.py rename to tests/api_defs/test_stock_status.py index 273a17b..b261531 100644 --- a/tests/test_api_defs/test_stock_status.py +++ b/tests/api_defs/test_stock_status.py @@ -2,12 +2,10 @@ from vshieldpy.api_defs.locations import Locations from vshieldpy.api_defs.plans import Plans -from vshieldpy.client import Client - -pytestmark = pytest.mark.anyio +from . import client -client = Client() +pytestmark = pytest.mark.anyio async def test_stock_status_check_stock(): diff --git a/tests/products/__init__.py b/tests/products/__init__.py new file mode 100644 index 0000000..8f8b527 --- /dev/null +++ b/tests/products/__init__.py @@ -0,0 +1 @@ +from ..client import client diff --git a/tests/test_products/test_server.py b/tests/products/test_server.py similarity index 96% rename from tests/test_products/test_server.py rename to tests/products/test_server.py index eee100b..fbdbe77 100644 --- a/tests/test_products/test_server.py +++ b/tests/products/test_server.py @@ -6,12 +6,11 @@ from vshieldpy.api_defs.operating_systems import OperatingSystems from vshieldpy.api_defs.plans import Plans from vshieldpy.api_defs.status_codes import Status -from vshieldpy.client import Client from vshieldpy.products import Server, Servers -pytestmark = pytest.mark.anyio +from . import client -client = Client() +pytestmark = pytest.mark.anyio SERVERS: tuple[Server, ...] = ( Server(