"""Tests that STATION_CODE is loaded from env and exposed on the client Config class."""
import importlib
import os


def test_station_code_read_from_env(monkeypatch):
    monkeypatch.setenv("STATION_CODE", "ST-TEST")
    import config
    importlib.reload(config)
    assert config.Config.STATION_CODE == "ST-TEST"


def test_station_code_defaults_to_none_when_missing(monkeypatch):
    monkeypatch.delenv("STATION_CODE", raising=False)
    import config
    importlib.reload(config)
    assert config.Config.STATION_CODE is None
