mirror of
https://github.com/simple-login/app.git
synced 2024-11-16 17:08:30 +01:00
12 lines
310 B
Python
12 lines
310 B
Python
import pytest
|
|
from app.config import sl_getenv
|
|
|
|
|
|
def test_sl_getenv(monkeypatch):
|
|
monkeypatch.setenv("SL_KEY_1", '["domain_1"]')
|
|
assert sl_getenv("SL_KEY_1") == ["domain_1"]
|
|
|
|
assert sl_getenv("SL_KEY_2", default_factory=list) == []
|
|
|
|
with pytest.raises(TypeError):
|
|
sl_getenv("SL_KEY_3")
|