14 lines
422 B
Python
14 lines
422 B
Python
from __future__ import annotations
|
|
|
|
from ariadne import settings as settings_module
|
|
|
|
|
|
def test_env_int_invalid(monkeypatch) -> None:
|
|
monkeypatch.setenv("ARIADNE_INT_TEST", "bad")
|
|
assert settings_module._env_int("ARIADNE_INT_TEST", 5) == 5
|
|
|
|
|
|
def test_env_float_invalid(monkeypatch) -> None:
|
|
monkeypatch.setenv("ARIADNE_FLOAT_TEST", "bad")
|
|
assert settings_module._env_float("ARIADNE_FLOAT_TEST", 1.5) == 1.5
|