16 lines
558 B
Python
16 lines
558 B
Python
import tomllib
|
|
from pathlib import Path
|
|
|
|
from estimator.domain.enums import Role
|
|
|
|
MARKET = Path(__file__).resolve().parents[3] / "config" / "market" / "2026Q4.toml"
|
|
|
|
|
|
def test_market_file_has_rates_for_known_roles():
|
|
data = tomllib.loads(MARKET.read_text())
|
|
for region in ("ru", "eu"):
|
|
hourly = data["rates"][region]["hourly"]
|
|
assert {"analyst", "backend", "qa", "devops"} <= set(hourly)
|
|
assert all(r in {x.value for x in Role} for r in hourly)
|
|
assert data["rates"][region]["basis"] in {"freelance", "agency_billing"}
|