File size: 590 Bytes
10aced5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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