diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d86f343 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[tool.pytest.ini_options] +testpaths = ["tests"] +pythonpath = ["lambdas/classifier", "lambdas/slack_post", "cdk"] diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..90357e0 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,13 @@ +"""Central test configuration. + +Sets dummy environment variables at import time so modules that read +``os.environ`` at module load (slackio, interactions, handler) can be imported +without real AWS credentials. Real values are monkeypatched per-test where +needed. +""" + +import os + +os.environ.setdefault("SLACK_SECRET_NAME", "test-slack-secret") +os.environ.setdefault("DASHBOARD_URL_PARAM", "/test/dashboard-url") +os.environ.setdefault("ANALYTICS_BUCKET", "test-bucket")