Switch to automatic versioning

This commit is contained in:
2024-04-21 17:20:58 +01:00
parent 4df979ef6b
commit 618b8c149b
10 changed files with 157 additions and 31 deletions

24
tests/test_config.py Normal file
View File

@ -0,0 +1,24 @@
"""Provides test cases for app/config.py."""
import os
vars: dict = {
"APP_VERSION": "dev",
"WEBEX_API_KEY": "testing",
"SENTRY_ENABLED": "false",
"SENTRY_DSN": "http://localhost"
}
for var, value in vars.items():
os.environ[var] = value
# needs to be imported AFTER environment variables are set
from app.config import config # pragma: no cover
def test_config() -> None:
assert config.webex_token == vars["WEBEX_API_KEY"]
assert config.version == vars["APP_VERSION"]
assert config.sentry_enabled == bool(vars["SENTRY_ENABLED"].lower() == "true")