Better test coverage

This commit is contained in:
Administrator 2023-04-12 00:40:45 +00:00
parent 07ef8df8ba
commit 8b04220c9f
1 changed files with 18 additions and 0 deletions

18
tests/test_client.py Normal file
View File

@ -0,0 +1,18 @@
from sporestack.api_client import APIClient
from sporestack.client import Client, Server, Token
def test_client() -> None:
client = Client()
assert isinstance(client.api_client, APIClient)
def test_server() -> None:
server = Server(machine_id="foobar")
assert isinstance(server.api_client, APIClient)
def test_token() -> None:
token = Token()
assert token.token.startswith("ss_t_")
assert isinstance(token.api_client, APIClient)