webexmemebot/tests/test_config.py
Luke Tainton 6abb3b871b
Some checks failed
Enforce Conventional Commit PR Title / Validate PR Title (pull_request_target) Successful in 7s
CI / ci (pull_request) Failing after 42s
fix(lint): Fix linting issues
2025-06-06 18:31:41 +01:00

24 lines
559 B
Python

"""Provides test cases for app/config.py."""
import os
env_vars: dict = {
"APP_VERSION": "dev",
"WEBEX_API_KEY": "testing",
}
for var, value in env_vars.items():
os.environ[var] = value
# needs to be imported AFTER environment variables are set
from app.config import (
config,
) # pylint: disable=wrong-import-position # pragma: no cover # noqa: E402
def test_config() -> None:
"""Test the configuration settings."""
assert config.webex_token == env_vars["WEBEX_API_KEY"]
assert config.version == env_vars["APP_VERSION"]