feat: add comprehensive unit tests for FragmentClient methods; include shared test constants

This commit is contained in:
bohd4nx
2026-03-21 16:30:44 +02:00
parent 2d1a119768
commit c7b6c6c933
9 changed files with 454 additions and 30 deletions
+9
View File
@@ -3,6 +3,9 @@ import os
import pytest
from pyfragment import FragmentClient
from tests.shared import VALID_API_KEY, VALID_COOKIES, VALID_SEED
@pytest.fixture
def cookies():
@@ -14,3 +17,9 @@ def cookies():
return json.loads(raw)
except Exception as exc:
pytest.skip(f"Cookies unavailable — {exc}")
@pytest.fixture
def client() -> FragmentClient:
"""Pre-built FragmentClient with dummy credentials."""
return FragmentClient(seed=VALID_SEED, api_key=VALID_API_KEY, cookies=VALID_COOKIES)