feat: move timezone preference to config file (#2096)

BREAKING CHANGE: The timezone preference moved to the configuration
file.
This commit is contained in:
Jonas L 2022-09-14 12:48:08 +02:00 committed by GitHub
parent 8ef82d798e
commit 9b3207b8a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 73 additions and 15 deletions

View file

@ -6,10 +6,22 @@ from libretime_shared.config._models import (
AudioMP3,
AudioOGG,
AudioOpus,
GeneralConfig,
StreamConfig,
)
def test_general_config_timezone():
defaults = {
"public_url": "http://localhost:8080",
"api_key": "api_key",
}
GeneralConfig(**defaults, timezone="UTC")
GeneralConfig(**defaults, timezone="Europe/Berlin")
with pytest.raises(ValidationError):
GeneralConfig(**defaults, timezone="Europe/Invalid")
@pytest.mark.parametrize(
"audio",
[