mbochniak01
Add typed client library, unit + integration tests, mypy, ruff, NOTES.md
10aced5
raw
history blame contribute delete
590 Bytes
import os
import pytest
from client.client import ValidatorClient
BASE_URL = os.environ.get("VALIDATOR_URL", "http://localhost:8000")
def pytest_configure(config: pytest.Config) -> None:
config.addinivalue_line(
"markers",
"integration: marks tests that require a running API server (deselect with -m 'not integration')",
)
@pytest.fixture(scope="session")
def base_url() -> str:
return BASE_URL
@pytest.fixture(scope="session")
def api_client(base_url: str) -> ValidatorClient:
with ValidatorClient(base_url=base_url) as client:
yield client