Skip to content

Commit

Permalink
Use single client for all tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
airblast-dev committed Mar 13, 2024
1 parent f718704 commit f1535d0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
1 change: 1 addition & 0 deletions tests/api_defs/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from ..client import client
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
1 change: 1 addition & 0 deletions tests/products/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from ..client import client
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit f1535d0

Please sign in to comment.